app/controllers/decidim/meetings/meetings_controller.rb in decidim-meetings-0.14.4 vs app/controllers/decidim/meetings/meetings_controller.rb in decidim-meetings-0.15.0

- old
+ new

@@ -6,11 +6,11 @@ class MeetingsController < Decidim::Meetings::ApplicationController include FilterResource include Paginable helper Decidim::WidgetUrlsHelper - helper_method :meetings, :geocoded_meetings, :meeting + helper_method :meetings, :meeting, :search def index return unless search.results.empty? && params.dig("filter", "date") != "past" @past_meetings = search_klass.new(search_params.merge(date: "past")) @@ -33,26 +33,28 @@ def meeting @meeting ||= Meeting.where(component: current_component).find(params[:id]) end def meetings - @meetings ||= paginate(search.results).visible_meeting_for(current_user) + @meetings ||= paginate(search.results) end - def geocoded_meetings - @geocoded_meetings ||= search.results.select(&:geocoded?) - end - def search_klass MeetingSearch end def default_filter_params { date: "upcoming", search_text: "", scope_id: "", category_id: "" + } + end + + def default_search_params + { + scope: Meeting.visible_meeting_for(current_user) } end def context_params { component: current_component, organization: current_organization }