Module: Gluttonberg::Content::Workflow::InstanceMethods

Defined in:
lib/gluttonberg/content/workflow.rb

Instance Method Summary collapse

Instance Method Details

#approve!Object

Sets the state to :approved and saves the record.



57
58
59
# File 'lib/gluttonberg/content/workflow.rb', line 57

def approve!
  update_attributes(:state=>:approved)
end

#reject!Object

Sets the state to :rejected and saves the record.



62
63
64
# File 'lib/gluttonberg/content/workflow.rb', line 62

def reject!
  update_attributes(:state=>:rejected)
end

#submit!Object

Sets the state to :pending and saves the record.



52
53
54
# File 'lib/gluttonberg/content/workflow.rb', line 52

def submit!
  update_attributes(:state => :pending)
end