2015-05-16 16:46:45 +12:00
|
|
|
class NoScope < ActiveRecord::Base
|
|
|
|
include AASM
|
|
|
|
aasm :create_scopes => false do
|
|
|
|
state :pending, :initial => true
|
|
|
|
state :running
|
|
|
|
event :run do
|
|
|
|
transitions :from => :pending, :to => :running
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2015-07-01 23:41:44 +12:00
|
|
|
|
|
|
|
class MultipleNoScope < ActiveRecord::Base
|
|
|
|
include AASM
|
2015-07-20 21:11:16 +12:00
|
|
|
aasm :left, :column => :aasm_state, :create_scopes => false do
|
2015-07-01 23:41:44 +12:00
|
|
|
state :pending, :initial => true
|
|
|
|
state :running
|
|
|
|
event :run do
|
|
|
|
transitions :from => :pending, :to => :running
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|