Sha256: 84d67699c73a5d07b1158a1b930f52c6eb19956c5c6e3341f05ba9ddb0b33223

Contents?: true

Size: 440 Bytes

Versions: 25

Compression:

Stored size: 440 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Meetings
    # This service scopes the meeting searches with parameters that cannot be
    # passed from the user interface.
    class MeetingSearch < ResourceSearch
      attr_reader :activity

      def build(params)
        @activity = params[:activity]

        add_scope(:authored_by, user) if params[:activity] == "my_meetings" && user

        super
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-meetings-0.27.2 app/services/decidim/meetings/meeting_search.rb
decidim-meetings-0.27.1 app/services/decidim/meetings/meeting_search.rb
decidim-meetings-0.27.0 app/services/decidim/meetings/meeting_search.rb
decidim-meetings-0.27.0.rc2 app/services/decidim/meetings/meeting_search.rb
decidim-meetings-0.27.0.rc1 app/services/decidim/meetings/meeting_search.rb