Improve associations

This commit is contained in:
wvengen 2015-04-10 18:30:12 +02:00
parent 124f77f2ab
commit 497488ef0e
2 changed files with 2 additions and 3 deletions

View file

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