Class: Decidim::Elections::ElectionGCell
- Inherits:
-
CardGCell
- Object
- CardGCell
- Decidim::Elections::ElectionGCell
- Includes:
- ElectionCellsHelper
- Defined in:
- app/cells/decidim/elections/election_g_cell.rb
Overview
This cell renders the Grid (:g) election card for a given instance of an Election
Instance Method Summary collapse
Instance Method Details
#has_image? ⇒ Boolean
14 15 16 |
# File 'app/cells/decidim/elections/election_g_cell.rb', line 14 def has_image? model.photos.present? end |
#metadata_cell ⇒ Object
10 11 12 |
# File 'app/cells/decidim/elections/election_g_cell.rb', line 10 def "decidim/elections/election_metadata" end |
#resource_image_path ⇒ Object
18 19 20 |
# File 'app/cells/decidim/elections/election_g_cell.rb', line 18 def resource_image_path model.photos.first.url if has_image? end |