Add letter origin back to poll voters
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
class Poll
|
class Poll
|
||||||
class Voter < ApplicationRecord
|
class Voter < ApplicationRecord
|
||||||
|
|
||||||
VALID_ORIGINS = %w{web booth}.freeze
|
VALID_ORIGINS = %w[web booth letter].freeze
|
||||||
|
|
||||||
belongs_to :poll
|
belongs_to :poll
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
@@ -22,6 +22,7 @@ class Poll
|
|||||||
|
|
||||||
scope :web, -> { where(origin: "web") }
|
scope :web, -> { where(origin: "web") }
|
||||||
scope :booth, -> { where(origin: "booth") }
|
scope :booth, -> { where(origin: "booth") }
|
||||||
|
scope :letter, -> { where(origin: "letter") }
|
||||||
|
|
||||||
def set_demographic_info
|
def set_demographic_info
|
||||||
return if user.blank?
|
return if user.blank?
|
||||||
|
|||||||
Reference in New Issue
Block a user