0
0
Fork 0
mirror of https://github.com/ENSL/ensl.org.git synced 2025-01-20 08:21:04 +00:00
ensl.org/vendor/plugins/acts_as_rateable/lib/rate.rb

10 lines
248 B
Ruby
Raw Normal View History

class Rate < ActiveRecord::Base
has_many :ratings
validates_presence_of :score
validates_uniqueness_of :score
validates_numericality_of :score, :greater_than_or_equal_to => 1, :less_than_or_equal_to => 10
attr_accessor :user_id
end