1 2 3 4 5 6
class Timelog < ActiveRecord::Base validates :time_spent, :user, presence: true belongs_to :trackable, polymorphic: true belongs_to :user end