I have an item model mostly shown below. I want the transitions to
change the belongs_to association such that the item will belong to
the acting user's current order. (order is another model which has
many items). how can i do this with the a "do"
fields do
...
end
belongs_to :menu
belongs_to :order
# --- LifeCycle --- #
lifecycle do
state :not_in_order, :default => true
state :in_order
transition :add_to_order, {:not_in_order => :in_order},
:available_to => "User" do
something cool here
end
transition :remove_from_order, {:in_order => :not_in_order},
:available_to => "User" do
something similiar here
end
end
I feel like this is the right approach, just not sure how to go about
it! Thanks
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.