mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Added PaperTrail console and rake users
This commit is contained in:
parent
14edac7b4e
commit
e7405f7df4
1 changed files with 4 additions and 4 deletions
|
@ -6,9 +6,9 @@ PaperTrail::Version.module_eval do
|
||||||
end
|
end
|
||||||
|
|
||||||
# Store console and rake changes in versions
|
# Store console and rake changes in versions
|
||||||
if defined?(::Rails::Console)
|
if defined?(::Rails::Console) || File.basename($PROGRAM_NAME).split(' ').first == 'spring'
|
||||||
PaperTrail.whodunnit = "#{`whoami`.strip}: console"
|
PaperTrail.whodunnit = "console-#{`whoami`.strip}"
|
||||||
elsif File.basename($PROGRAM_NAME) == "rake"
|
elsif File.basename($PROGRAM_NAME) == "rake"
|
||||||
PaperTrail.whodunnit = "#{`whoami`.strip}: rake #{ARGV.join ' '}"
|
# rake username does not work when spring enabled
|
||||||
|
PaperTrail.whodunnit = "rake-#{`whoami`.strip} #{ARGV.join ' '}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue