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
|
|
@ -6,7 +6,7 @@ class OrderArticle < ApplicationRecord
|
|||
|
||||
belongs_to :order
|
||||
belongs_to :article
|
||||
belongs_to :article_price
|
||||
belongs_to :article_price, optional: true
|
||||
has_many :group_order_articles, :dependent => :destroy
|
||||
|
||||
validates_presence_of :order_id, :article_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue