class Event < ActiveRecord::Base
  belongs_to :user, polymorphic: true
  belongs_to :exercise
  belongs_to :file
end

class Event < ActiveRecord::Base
  belongs_to :user, polymorphic: true
  belongs_to :exercise
  belongs_to :file

  validates :category, presence: true
  validates :data, presence: true
end

Validate presence of category and data attribute
Validate presence of category and data attribute
