Class: Decidim::Meetings::MeetingsController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Features::BaseController
- ApplicationController
- Decidim::Meetings::MeetingsController
- Includes:
- FilterResource, Paginable
- Defined in:
- decidim-meetings/app/controllers/decidim/meetings/meetings_controller.rb
Overview
Exposes the meeting resource so users can view them
Constant Summary
Constants included from Paginable
Instance Method Summary collapse
Methods inherited from Features::BaseController
#ability_context, #current_feature, #current_manifest, #current_participatory_process
Methods included from ActionAuthorization
#_action_authorizer, #action_authorization, #authorize_action!, #authorize_action_path, #authorize_action_path_from_status
Methods included from NeedsParticipatoryProcess
enhance_controller, extended, included
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#index ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'decidim-meetings/app/controllers/decidim/meetings/meetings_controller.rb', line 13 def index return unless search.results.empty? && params.dig("filter", "date") != "past" @past_meetings = search_klass.new(search_params.merge(date: "past")) unless @past_meetings.results.empty? params[:filter] ||= {} params[:filter][:date] = "past" @forced_past_meetings = true @search = @past_meetings end end |