Class: Decidim::Meetings::ContentBlocks::HighlightedMeetingsCell
- Inherits:
-
ContentBlocks::HighlightedElementsCell
- Object
- ContentBlocks::HighlightedElementsCell
- Decidim::Meetings::ContentBlocks::HighlightedMeetingsCell
- Defined in:
- app/cells/decidim/meetings/content_blocks/highlighted_meetings_cell.rb
Instance Method Summary collapse
Instance Method Details
#base_relation ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'app/cells/decidim/meetings/content_blocks/highlighted_meetings_cell.rb', line 7 def base_relation Decidim::Meetings::Meeting .except_withdrawn .published .not_hidden .upcoming .visible_for(current_user) .where(component: published_components) end |
#elements ⇒ Object
17 18 19 |
# File 'app/cells/decidim/meetings/content_blocks/highlighted_meetings_cell.rb', line 17 def elements @elements ||= base_relation.order(start_time: :asc).limit(limit) end |
#geolocation_enabled? ⇒ Boolean
21 22 23 |
# File 'app/cells/decidim/meetings/content_blocks/highlighted_meetings_cell.rb', line 21 def geolocation_enabled? Decidim::Map.available?(:geocoding) end |