Improve associations
This commit is contained in:
parent
124f77f2ab
commit
497488ef0e
2 changed files with 2 additions and 3 deletions
|
|
@ -8,6 +8,7 @@ class Order < ActiveRecord::Base
|
|||
has_many :articles, :through => :order_articles
|
||||
has_many :group_orders, :dependent => :destroy
|
||||
has_many :ordergroups, :through => :group_orders
|
||||
has_many :users_ordered, :through => :ordergroups, :source => :users
|
||||
has_one :invoice
|
||||
has_many :comments, -> { order('created_at') }, :class_name => "OrderComment"
|
||||
has_many :stock_changes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue