validates user has not already voted

This commit is contained in:
rgarcia
2016-09-19 18:22:35 +02:00
parent 0ec3a8e8bf
commit 48d2aaa845
6 changed files with 31 additions and 0 deletions

4
app/models/poll.rb Normal file
View File

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