Class: Decidim::Meetings::MeetingSearch

Inherits:
ResourceSearch
  • Object
show all
Defined in:
decidim-meetings/app/services/decidim/meetings/meeting_search.rb

Overview

This service scopes the meeting searches with parameters that cannot be passed from the user interface.

Instance Attribute Summary collapse

Attributes inherited from ResourceSearch

#component, #organization, #search_context, #user

Instance Method Summary collapse

Methods inherited from ResourceSearch

#configure, #initialize

Constructor Details

This class inherits a constructor from Decidim::ResourceSearch

Instance Attribute Details

#activityObject (readonly)

Returns the value of attribute activity.



8
9
10
# File 'decidim-meetings/app/services/decidim/meetings/meeting_search.rb', line 8

def activity
  @activity
end

Instance Method Details

#build(params) ⇒ Object



10
11
12
13
14
15
16
# File 'decidim-meetings/app/services/decidim/meetings/meeting_search.rb', line 10

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

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

  super
end