module Workflow::Adapter::Sequel::InstanceMethods

Public Instance Methods

before_validation() click to toggle source
Calls superclass method
# File lib/workflow/adapter/sequel.rb, line 18
def before_validation
  send("#{self.class.workflow_column}=", current_state.to_s) unless send(self.class.workflow_column)
  super
end
load_workflow_state() click to toggle source
# File lib/workflow/adapter/sequel.rb, line 9
def load_workflow_state
  send(self.class.workflow_column)
end
persist_workflow_state(new_value) click to toggle source
# File lib/workflow/adapter/sequel.rb, line 13
def persist_workflow_state(new_value)
  send("#{self.class.workflow_column}=", new_value)
  save(changed: true, columns: [self.class.workflow_column], validate: false)
end