Class: Decidim::Meetings::ContentBlocks::HighlightedMeetingsCell

Inherits:
ContentBlocks::HighlightedElementsCell
  • Object
show all
Defined in:
app/cells/decidim/meetings/content_blocks/highlighted_meetings_cell.rb

Instance Method Summary collapse

Instance Method Details

#base_relationObject



7
8
9
# File 'app/cells/decidim/meetings/content_blocks/highlighted_meetings_cell.rb', line 7

def base_relation
  Decidim::Meetings::Meeting.except_withdrawn.where(component: published_components)
end

#elementsObject



11
12
13
# File 'app/cells/decidim/meetings/content_blocks/highlighted_meetings_cell.rb', line 11

def elements
  @elements ||= base_relation.order(start_time: :asc).limit(limit)
end

#geolocation_enabled?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/cells/decidim/meetings/content_blocks/highlighted_meetings_cell.rb', line 15

def geolocation_enabled?
  Decidim::Map.available?(:geocoding)
end