I'm trying to create a simple POS (Point of Sale) system using rails 3, ruby 1.8.7
I have associations set up in the order models to the items and seats (tables)
CODE
I'm trying to create a simple POS (Point of Sale) system using rails 3, ruby 1.8.7
I have associations set up in the order models to the items and seats (tables)
CODE
I'm trying to create a simple POS (Point of Sale) system using rails 3, ruby 1.8.7
I have associations set up in the order models to the items and seats (tables)
CODE #################### class Order < ActiveRecord::Base has_many :order_splits has_many :order_split_items, :through => :order_splits
#order.table_id associates to seat.id belongs_to :seat, :foreign_key => 'table_id' end
class OrderSplit < ActiveRecord::Base belongs_to :order belongs_to :order_split_item end
class OrderSplitItem < ActiveRecord::Base belongs_to :items
That should be has_many, not belongs_to (or it is wrong in Item below).
Colin