Class: Decidim::Votings::BallotStyle

Inherits:
ApplicationRecord show all
Defined in:
decidim-elections/app/models/decidim/votings/ballot_style.rb

Instance Method Summary collapse

Instance Method Details

#questions_for(election) ⇒ Object


24
25
26
# File 'decidim-elections/app/models/decidim/votings/ballot_style.rb', line 24

def questions_for(election)
  questions.where(election: election)
end

#slugObject


20
21
22
# File 'decidim-elections/app/models/decidim/votings/ballot_style.rb', line 20

def slug
  "#{voting.slug}_#{code.parameterize}-#{id}"
end