models: drop unnecessary presence validations.
In rails 5, belongs_to associations automatically validate that the associated item is present, meaning that we don't need to validate these things manually any more.
This commit is contained in:
@@ -2,7 +2,6 @@ class JanitorTrial < ApplicationRecord
|
||||
belongs_to :user
|
||||
after_create :send_dmail
|
||||
after_create :promote_user
|
||||
validates_presence_of :user
|
||||
belongs_to_creator
|
||||
validates_inclusion_of :status, :in => %w(active inactive)
|
||||
before_validation :initialize_status
|
||||
|
||||
Reference in New Issue
Block a user