validates user has not already voted

This commit is contained in:
rgarcia
2016-09-19 18:22:35 +02:00
committed by kikito
parent 44df91346a
commit 8dc7285681
6 changed files with 30 additions and 1 deletions

View File

@@ -1,2 +1,4 @@
class Poll < ActiveRecord::Base
end
has_many :booths
has_many :voters, through: :booths, class_name: "Poll::Voter"
end