mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-29 14:01:48 +00:00
7 lines
182 B
Ruby
7 lines
182 B
Ruby
|
class Rating < ActiveRecord::Base
|
||
|
belongs_to :rate
|
||
|
belongs_to :rateable, :polymorphic => true
|
||
|
|
||
|
validates_uniqueness_of :user_id, :scope => [:rateable_id, :rateable_type]
|
||
|
end
|