module RunShell::Rails::Controller
Public Class Methods
included(base)
click to toggle source
# File lib/run_shell/frameworks/rails.rb, line 5 def self.included(base) if defined?(ActionController) && base == ActionController::Base base.before_filter :set_run_shell_whodunnit end end
Protected Instance Methods
set_run_shell_whodunnit()
click to toggle source
# File lib/run_shell/frameworks/rails.rb, line 16 def set_run_shell_whodunnit ::RunShell.whodunnit = user_for_run_shell end
user_for_run_shell()
click to toggle source
# File lib/run_shell/frameworks/rails.rb, line 12 def user_for_run_shell current_user if defined?(current_user) end