Displaying 1 result from an estimated 1 matches for "aasm_initial_state".
2009 Mar 26
0
acts_as_versioned and qa
...t;< ''qa''
self.non_versioned_columns << ''published_at''
How to make the approve! method to start working, while data change
should trigger qa reset?
Tom
PS Here is saple code:
class Article < ActiveRecord::Base
include AASM
aasm_column :qa
aasm_initial_state :pending
aasm_state :pending
aasm_state :approved
aasm_state :rejected
aasm_event :approve do
transitions :from => :pending, :to => :approved, :guard => :valid?
end
aasm_event :reject do
transitions :from => :pending, :to => :rejected, :guard => :valid?
end...