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:
evazion
2019-08-04 14:40:37 -05:00
parent 7c8c4e9f82
commit a926b162be
16 changed files with 11 additions and 36 deletions

View File

@@ -1,7 +1,6 @@
class ModAction < ApplicationRecord
belongs_to :creator, :class_name => "User"
before_validation :initialize_creator, :on => :create
validates_presence_of :creator_id
#####DIVISIONS#####
#Groups: 0-999