photomix/app/models/rate.rb

8 lines
213 B
Ruby
Raw Normal View History

2012-07-26 22:26:23 +02:00
class Rate < ActiveRecord::Base
belongs_to :rater, :class_name => "User"
belongs_to :rateable, :polymorphic => true
validates_numericality_of :stars, :minimum => 1
attr_accessible :rate, :dimension
end