class Decidim::Meetings::MeetingSearch

find the meetings.
‘current_component` param with a `Decidim::Component` in order to
This class handles search and filtering of meetings. Needs a

def initialize(options = {})

per_page - The number of proposals to return per page.
page - The page number to paginate the results.
component - A Decidim::Component to get the meetings from.
Public: Initializes the service.
def initialize(options = {})
  scope = options.fetch(:scope, Meeting.all)
  super(scope, options)
end

def search_date

Handle the date filter
def search_date
  apply_scopes(%w(upcoming past), date)
end

def search_space

def search_space
  return query if options[:space].blank? || options[:space] == "all"
  query.joins(:component).where(decidim_components: { participatory_space_type: options[:space].classify })
end