Class: Decidim::InitiativesVotes::VoteCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::InitiativesVotes::VoteCell
- Defined in:
- app/cells/decidim/initiatives_votes/vote_cell.rb
Instance Method Summary collapse
- #date_of_birth ⇒ Object
- #document_number ⇒ Object
- #initiative_id ⇒ Object
- #initiative_title ⇒ Object
- #name_and_surname ⇒ Object
- #postal_code ⇒ Object
- #scope ⇒ Object
- #show ⇒ Object
- #time_and_date ⇒ Object
Instance Method Details
#date_of_birth ⇒ Object
28 29 30 |
# File 'app/cells/decidim/initiatives_votes/vote_cell.rb', line 28 def date_of_birth [:date_of_birth] end |
#document_number ⇒ Object
24 25 26 |
# File 'app/cells/decidim/initiatives_votes/vote_cell.rb', line 24 def document_number [:document_number] end |
#initiative_id ⇒ Object
12 13 14 |
# File 'app/cells/decidim/initiatives_votes/vote_cell.rb', line 12 def initiative_id model.initiative.reference end |
#initiative_title ⇒ Object
16 17 18 |
# File 'app/cells/decidim/initiatives_votes/vote_cell.rb', line 16 def initiative_title decidim_sanitize_translated(model.initiative.title) end |
#name_and_surname ⇒ Object
20 21 22 |
# File 'app/cells/decidim/initiatives_votes/vote_cell.rb', line 20 def name_and_surname [:name_and_surname] end |
#postal_code ⇒ Object
32 33 34 |
# File 'app/cells/decidim/initiatives_votes/vote_cell.rb', line 32 def postal_code [:postal_code] end |
#scope ⇒ Object
40 41 42 43 44 45 |
# File 'app/cells/decidim/initiatives_votes/vote_cell.rb', line 40 def scope return I18n.t("decidim.scopes.global") if model.decidim_scope_id.nil? return I18n.t("decidim.initiatives.unavailable_scope") if model.scope.blank? translated_attribute(model.scope.name) end |
#show ⇒ Object
8 9 10 |
# File 'app/cells/decidim/initiatives_votes/vote_cell.rb', line 8 def show render end |
#time_and_date ⇒ Object
36 37 38 |
# File 'app/cells/decidim/initiatives_votes/vote_cell.rb', line 36 def time_and_date model.created_at end |