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