I have three (really 4) classes working together: menus, items, orders
(and order_assists). Their associations are listed below. I have
lifecycles setup for items with two states, :in_order
and :not_in_order. I'm already showing items on the menu show page
(using auto actions for) and have edited the item cards such that the
transition button shows on the card. This is all great! However, I'm
shooting for having the transition associate the item to the current
user's order (I can just assume the current user has an order
already). I don't see any documentation in any tutorials or in the
manual on how to accomplish this.

Can it be done? Or do I want to do this another way? Create a custom
form somehow? Please advise!

menus:
  has_many :items, :dependent => :destroy
  has_many :orders

items:
  belongs_to :menu
  has_many :order_assist
  has_many :orders, :through => :order_assist, :accessible => true

orders:
  belongs_to  :user, :creator => true
  belongs_to  :menu
  has_many    :order_assist
  has_many    :items, :through => :order_assist, :accessible => true

order_assists:
  belongs_to :order
  belongs_to :item
  belongs_to :menu

-HoboHippy

-- 
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.

Reply via email to