app/models/recommendable/dislike.rb in recommendable-0.1.4 vs app/models/recommendable/dislike.rb in recommendable-0.1.5
- old
+ new
@@ -1,6 +1,8 @@
module Recommendable
class Dislike < ActiveRecord::Base
+ self.table_name = 'recommendable_dislikes'
+
belongs_to :user, :class_name => Recommendable.user_class.to_s
belongs_to :dislikeable, :polymorphic => :true
validates :user_id, :uniqueness => { :scope => [:dislikeable_id, :dislikeable_type],
:message => "has already disliked this item" }