Class: StateAdjustment
- Inherits:
-
StateChange
- Object
- ActiveRecord::Base
- ApplicationRecord
- StateChange
- StateAdjustment
- Defined in:
- app/models/state_adjustment.rb
Overview
Manual and arbitrary adjustment in the state of a state machine (a request, reimbursement, etc.) ignoring the transitions definitions in the state machine. Saving the StateAdjustment to the database will update the associated state machine automatically.
StateAdjustment objects should only be used in situations in which StateTransition is not applicable. In order to keep the information as sane as possible, state transitions are cleary encouraged instead of state adjustments, since the former follows the the state machine specification and the later can break the expected workflow.
Instance Attribute Summary
Attributes inherited from StateChange
#created_at, #from, #machine_type, #notes, #state_event, #to, #type, #updated_at
Instance Method Summary collapse
Methods inherited from StateChange
#machine, newest_first, oldest_first, #user
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes
Instance Method Details
#human_action_name ⇒ Object
20 21 22 |
# File 'app/models/state_adjustment.rb', line 20 def human_action_name I18n.t('activerecord.models.state_change.action_name') end |