Class: UsersStarProjectsFinder

Inherits:
Object
  • Object
show all
Includes:
CustomAttributesFilter
Defined in:
app/finders/users_star_projects_finder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CustomAttributesFilter

#by_custom_attributes

Constructor Details

#initialize(project, params = {}, current_user: nil) ⇒ UsersStarProjectsFinder

Returns a new instance of UsersStarProjectsFinder.



8
9
10
11
12
# File 'app/finders/users_star_projects_finder.rb', line 8

def initialize(project, params = {}, current_user: nil)
  @params = params
  @project = project
  @current_user = current_user
end

Instance Attribute Details

#paramsObject

Returns the value of attribute params.



6
7
8
# File 'app/finders/users_star_projects_finder.rb', line 6

def params
  @params
end

Instance Method Details

#executeObject



14
15
16
17
18
19
# File 'app/finders/users_star_projects_finder.rb', line 14

def execute
  stars = UsersStarProject.with_active_user
  stars = by_project(stars)
  stars = by_search(stars)
  filter_visible_profiles(stars)
end