Class: Decidim::Votings::BallotStyle
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Decidim::Votings::BallotStyle
- Defined in:
- app/models/decidim/votings/ballot_style.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.log_presenter_class_for(_log) ⇒ Object
30 31 32 |
# File 'app/models/decidim/votings/ballot_style.rb', line 30 def self.log_presenter_class_for(_log) Decidim::Votings::AdminLog::BallotStylePresenter end |
Instance Method Details
#questions_for(election) ⇒ Object
26 27 28 |
# File 'app/models/decidim/votings/ballot_style.rb', line 26 def questions_for(election) questions.where(election:) end |
#slug ⇒ Object
22 23 24 |
# File 'app/models/decidim/votings/ballot_style.rb', line 22 def slug "#{voting.slug}_#{code.parameterize}-#{id}" end |