allows voting only in one origin: booth or web
This commit is contained in:
@@ -15,6 +15,6 @@ class Poll::Answer < ActiveRecord::Base
|
||||
scope :by_question, ->(question_id) { where(question_id: question_id) }
|
||||
|
||||
def record_voter_participation
|
||||
Poll::Voter.find_or_create_by!(user: author, poll: poll)
|
||||
Poll::Voter.find_or_create_by!(user: author, poll: poll, origin: "web")
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user