Remove redundant presence validation on belongs_to
There's no need for us to have it when rails does this for us.
This commit is contained in:
parent
2122d1843e
commit
8938ab7997
22 changed files with 16 additions and 33 deletions
|
@ -16,6 +16,6 @@ class UserPreference < ApplicationRecord
|
|||
|
||||
belongs_to :user
|
||||
|
||||
validates :user, :presence => true, :associated => true
|
||||
validates :user, :associated => true
|
||||
validates :k, :v, :length => 1..255, :characters => true
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue