Module: ActionLogsHelper
- Defined in:
- app/helpers/action_logs_helper.rb
Instance Method Summary collapse
Instance Method Details
#log_action(action, source, attrs = {}) ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'app/helpers/action_logs_helper.rb', line 2 def log_action action, source, attrs = {} attrs[:sender] ||= try(:current_user) attrs[:ip] ||= request.try(:remote_ip) attrs[:data] ||= params attrs[:admin_id] ||= try(:current_admin_user) ActionLogger.log action, source, attrs end |