Module: BetterRecord::ModelConcerns::LoggedActionBase
- Extended by:
- ActiveSupport::Concern
- Included in:
- LoggedAction
- Defined in:
- app/models/better_record/model_concerns/logged_action_base.rb
Constant Summary collapse
- ACTIONS =
{ D: 'DELETE', I: 'INSERT', U: 'UPDATE', T: 'TRUNCATE', A: 'ARCHIVE', }.with_indifferent_access
Instance Method Summary collapse
Instance Method Details
#action_type ⇒ Object
45 46 47 |
# File 'app/models/better_record/model_concerns/logged_action_base.rb', line 45 def action_type ACTIONS[action] || 'UNKNOWN' end |
#changed_columns ⇒ Object
41 42 43 |
# File 'app/models/better_record/model_concerns/logged_action_base.rb', line 41 def changed_columns (self.changed_fields || {}).keys.join(', ').presence || 'N/A' end |