mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-30 14:31:12 +00:00
10 lines
No EOL
248 B
Ruby
10 lines
No EOL
248 B
Ruby
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 |