module ModelActivityLogger

Public Instance Methods

record_activity_log(action) click to toggle source
# File lib/activity_log/model_activity_logger.rb, line 6
def record_activity_log(action)
  # if current_user_id == nil, then the User is in the process of Logging In
  current_id = defined?(current_user_id) ? current_user_id : nil
  activity_logs.create user_id: current_id, action: action, data: changes, action_type: 'model', parent_activity_id: current_parent_activity_id
end