Class: Decidim::Votings::BallotStyle

Inherits:
ApplicationRecord show all
Defined in:
decidim-elections/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 'decidim-elections/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 'decidim-elections/app/models/decidim/votings/ballot_style.rb', line 26

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

#slugObject


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

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