given the below;
aasm do
state :available, :intitial => true
state :presented
state :invited
event :present do
transitions :from => :available, :to => :presented
end
event :invite do
transitions :from => :presented, :to => :invited
end
event :provide do
transitions :from => [:presented, :invited], :to => :available
end
end
what is an optimal pattern for setting the time period that an object 'lives under' a given state ?
ie, once the 'present' event occurs, I'd like the object to maintain the 'presented' state for exactly two hours, i'm feeling like I will have to mangle the way aasm works to achieve this, any thoughts ?
extra: this aasm code is being inserted into an active record class in a rails app, postgres is the db. Thx!