diff --git a/plugins/vote/lib/ext/vote.rb b/plugins/vote/lib/ext/vote.rb new file mode 100644 index 0000000..12f78f6 --- /dev/null +++ b/plugins/vote/lib/ext/vote.rb @@ -0,0 +1,7 @@ +require_dependency 'models/vote' + +class Vote + + validates_uniqueness_of :voteable_id, :scope => [:voteable_type, :voter_type, :voter_id] + +end diff --git a/vendor/plugins/vote_fu/lib/models/vote.rb b/vendor/plugins/vote_fu/lib/models/vote.rb index a428638..fa7871b 100644 --- a/vendor/plugins/vote_fu/lib/models/vote.rb +++ b/vendor/plugins/vote_fu/lib/models/vote.rb @@ -12,6 +12,6 @@ class Vote < ActiveRecord::Base attr_accessible :vote, :voter, :voteable # Uncomment this to limit users to a single vote on each item. - validates_uniqueness_of :voteable_id, :scope => [:voteable_type, :voter_type, :voter_id] + #validates_uniqueness_of :voteable_id, :scope => [:voteable_type, :voter_type, :voter_id] end -- libgit2 0.21.2