Validate presence of category and data attribute
This commit is contained in:
@ -2,4 +2,7 @@ class Event < ActiveRecord::Base
|
||||
belongs_to :user, polymorphic: true
|
||||
belongs_to :exercise
|
||||
belongs_to :file
|
||||
|
||||
validates :category, presence: true
|
||||
validates :data, presence: true
|
||||
end
|
||||
|
Reference in New Issue
Block a user