Module: WorkflowActiverecord::InstanceMethods
- Defined in:
- lib/workflow-activerecord.rb
Instance Method Summary collapse
- #load_workflow_state ⇒ Object
-
#persist_workflow_state(new_value) ⇒ Object
On transition the new workflow state is immediately saved in the database.
Instance Method Details
#load_workflow_state ⇒ Object
14 15 16 |
# File 'lib/workflow-activerecord.rb', line 14 def load_workflow_state read_attribute(self.class.workflow_column) end |
#persist_workflow_state(new_value) ⇒ Object
On transition the new workflow state is immediately saved in the database.
20 21 22 23 |
# File 'lib/workflow-activerecord.rb', line 20 def persist_workflow_state(new_value) # Rails 3.1 or newer update_column self.class.workflow_column, new_value end |