Module: Workflow::ActiveRecordInstanceMethods

Defined in:
lib/workflow.rb

Instance Method Summary collapse

Instance Method Details

#load_workflow_stateObject



293
294
295
# File 'lib/workflow.rb', line 293

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.



299
300
301
# File 'lib/workflow.rb', line 299

def persist_workflow_state(new_value)
  update_attribute self.class.workflow_column, new_value
end