mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +02:00
14 lines
533 B
Ruby
14 lines
533 B
Ruby
# the following line is required for PaperTrail >= 4.0.0 with Rails
|
|
PaperTrail::Rails::Engine.eager_load!
|
|
|
|
PaperTrail::Version.module_eval do
|
|
self.abstract_class = true
|
|
end
|
|
|
|
# Store console and rake changes in versions
|
|
if defined?(::Rails::Console) || File.basename($PROGRAM_NAME).split(' ').first == 'spring'
|
|
PaperTrail.whodunnit = "console-#{`whoami`.strip}"
|
|
elsif File.basename($PROGRAM_NAME) == "rake"
|
|
# rake username does not work when spring enabled
|
|
PaperTrail.whodunnit = "rake-#{`whoami`.strip} #{ARGV.join ' '}"
|
|
end
|