Class: ActionLog
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ActionLog
- Defined in:
- app/models/action_log.rb
Class Method Summary collapse
Class Method Details
.log(action, source, sender = nil, ip = nil, data = {}, admin_id = nil) ⇒ Object
5 6 7 |
# File 'app/models/action_log.rb', line 5 def self.log action, source, sender = nil, ip = nil, data = {}, admin_id = nil create! action: action, source: source, sender: sender, ip: ip, data: data, admin_id: (admin_id.present? && admin_id.respond_to?(:id) ? admin_id.id : admin_id) end |