Remove lib folder from autoload path

- Load extensions explicitly
This commit is contained in:
Artur Beljajev 2018-06-05 17:26:14 +03:00
parent 9ea5b54f5c
commit 30ac973f96
12 changed files with 25 additions and 25 deletions

View file

@ -0,0 +1,23 @@
# 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.zone.now.to_s(:db)
end
end
end