class ActivityLog
Constants
- ACTIONABLE_ACTIONS
- NON_CRUD_ACTIONABLE_ACTIONS
- TROGDIR_ACTIONABLE_ACTIONS
- WS_ACTIONABLE_ACTIONS
Public Instance Methods
actionable_action?()
click to toggle source
# File lib/buweb/activity_log.rb, line 83 def actionable_action? ACTIONABLE_ACTIONS.include? action_performed end
associated=(parent)
click to toggle source
# File lib/buweb/activity_log.rb, line 78 def associated=(parent) self.associated_id = parent.id self.associated_class = parent.class.to_s end
changes_made()
click to toggle source
# File lib/buweb/activity_log.rb, line 103 def changes_made snapshot.map do |attrib, changes| "#{attrib.titleize} was changed" + case changes.try(:length) when 2 " from #{changes[0].inspect} to #{changes[1].inspect}" when 1 " to #{changes.inspect}" end + '.' end end
non_crud_actionable_action?()
click to toggle source
# File lib/buweb/activity_log.rb, line 87 def non_crud_actionable_action? NON_CRUD_ACTIONABLE_ACTIONS.include? action_performed end
set_acting_user=(user)
click to toggle source
# File lib/buweb/activity_log.rb, line 69 def set_acting_user=(user) if user.is_a? String self.acting_user = user else self.acting_user = user.name if user.respond_to?(:name) self.acting_user_email = user.email if user.respond_to?(:email) end end
to_s()
click to toggle source
# File lib/buweb/activity_log.rb, line 99 def to_s action_performed.humanize.capitalize end
trogdir_actionable_action?()
click to toggle source
# File lib/buweb/activity_log.rb, line 91 def trogdir_actionable_action? TROGDIR_ACTIONABLE_ACTIONS.include? action_performed end
ws_actionable_actions?()
click to toggle source
# File lib/buweb/activity_log.rb, line 95 def ws_actionable_actions? WS_ACTIONABLE_ACTIONS.include? action_performed end