aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-01-05 17:43:38 +0000
committerLouise Crow <louise.crow@gmail.com>2015-04-27 16:55:02 +0100
commit61faadbac1b4a71148248382425beb4368cb4cb0 (patch)
treea86c572057b20b89d24c112a1c81375caeaac737 /app/models
parentd16b7e1f15e9c7abe3db986850f5e60ff186c271 (diff)
Validate the uniqueness of cookies within the scope of info requests.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/widget_vote.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/widget_vote.rb b/app/models/widget_vote.rb
index 33697f0fb..021c38b30 100644
--- a/app/models/widget_vote.rb
+++ b/app/models/widget_vote.rb
@@ -15,4 +15,5 @@ class WidgetVote < ActiveRecord::Base
attr_accessible :cookie
validates :cookie, :length => { :is => 20 }
+ validates_uniqueness_of :cookie, :scope => :info_request_id
end