Adopt Rails 5 belongs_to_required_by_default
This commit is contained in:
parent
2557645f4f
commit
44a198c7bc
23 changed files with 53 additions and 38 deletions
|
|
@ -11,8 +11,8 @@ class Order < ApplicationRecord
|
|||
has_many :users_ordered, :through => :ordergroups, :source => :users
|
||||
has_many :comments, -> { order('created_at') }, :class_name => "OrderComment"
|
||||
has_many :stock_changes
|
||||
belongs_to :invoice
|
||||
belongs_to :supplier
|
||||
belongs_to :invoice, optional: true
|
||||
belongs_to :supplier, optional: true
|
||||
belongs_to :updated_by, :class_name => 'User', :foreign_key => 'updated_by_user_id'
|
||||
belongs_to :created_by, :class_name => 'User', :foreign_key => 'created_by_user_id'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue