Module: PaperTrail::Rails::RunnerCommandExtensions

Included in:
Rails::Command::RunnerCommand
Defined in:
lib/paper_trail/rails/runner_command_extensions.rb

Instance Method Summary collapse

Instance Method Details

#perform(code_or_file = nil, *command_argv) ⇒ Object Also known as: runner



12
13
14
15
16
17
18
19
# File 'lib/paper_trail/rails/runner_command_extensions.rb', line 12

def perform(code_or_file = nil, *command_argv)
  PaperTrail.request.whodunnit = nil
  PaperTrail::Rails.
  PaperTrail.(
    command: "rails runner: #{code_or_file} #{command_argv.join(' ')}"
  )
  super
end