mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
PaperTrail moved up in intialized change
This commit is contained in:
parent
84d21a0a6e
commit
caa93765a9
1 changed files with 0 additions and 0 deletions
|
@ -1,23 +0,0 @@
|
|||
# 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
|
||||
|
||||
class PaperSession
|
||||
class << self
|
||||
attr_writer :session
|
||||
def session
|
||||
@session ||= Time.now.to_s(:db)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue