Module: Sequel::Plugins::StateMachineAuditLog::DatasetMethods
- Defined in:
- lib/sequel/plugins/state_machine_audit_log.rb
Instance Method Summary collapse
Instance Method Details
#failed ⇒ Object
51 52 53 54 55 56 |
# File 'lib/sequel/plugins/state_machine_audit_log.rb', line 51 def failed colmap = self.model.state_machine_column_mappings tostate_col = colmap[:to_state] fromstate_col = colmap[:from_state] return self.where(tostate_col => fromstate_col) end |
#succeeded ⇒ Object
58 59 60 61 62 63 |
# File 'lib/sequel/plugins/state_machine_audit_log.rb', line 58 def succeeded colmap = self.model.state_machine_column_mappings tostate_col = colmap[:to_state] fromstate_col = colmap[:from_state] return self.exclude(tostate_col => fromstate_col) end |