mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Improve readability
This commit is contained in:
parent
aea4bf974a
commit
67a90c2ef1
9 changed files with 9 additions and 9 deletions
16
lib/gem_monkey_patches/paper_trail.rb
Normal file
16
lib/gem_monkey_patches/paper_trail.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Store console and rake changes in versions
|
||||
if defined?(::Rails::Console)
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue