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
|
|
@ -9,7 +9,7 @@ class Supplier < ApplicationRecord
|
|||
has_many :deliveries
|
||||
has_many :invoices
|
||||
belongs_to :supplier_category
|
||||
belongs_to :shared_supplier # for the sharedLists-App
|
||||
belongs_to :shared_supplier, optional: true # for the sharedLists-App
|
||||
|
||||
validates :name, :presence => true, :length => { :in => 4..30 }
|
||||
validates :phone, :presence => true, :length => { :in => 8..25 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue