Module: Decidim::Posts::PostsHelper

Includes:
ApplicationHelper, Meetings::ApplicationHelper, ResourceHelper, TranslationsHelper
Defined in:
app/helpers/decidim/posts/posts_helper.rb

Overview

Custom helpers used in posts views

Instance Method Summary collapse

Instance Method Details

#calendar_monthsObject



12
13
14
# File 'app/helpers/decidim/posts/posts_helper.rb', line 12

def calendar_months
  [Date.current, Date.current.next_month]
end

#collectionObject



16
17
18
# File 'app/helpers/decidim/posts/posts_helper.rb', line 16

def collection
  @collection ||= meetings.limit(limit)
end

#limitObject



24
25
26
# File 'app/helpers/decidim/posts/posts_helper.rb', line 24

def limit
  3
end

#meetingsObject



20
21
22
# File 'app/helpers/decidim/posts/posts_helper.rb', line 20

def meetings
  @meetings ||= show_upcoming_meetings? ? upcoming_meetings : past_meetings
end

#participatory_spaceObject



28
29
30
# File 'app/helpers/decidim/posts/posts_helper.rb', line 28

def participatory_space
  @participatory_space ||= current_component.participatory_space
end