Class: Projects::TopicsFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/projects/topics_finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(organization_id:, params: {}) ⇒ TopicsFinder

Returns a new instance of TopicsFinder.



10
11
12
13
# File 'app/finders/projects/topics_finder.rb', line 10

def initialize(organization_id:, params: {})
  @params = params
  @organization_id = organization_id
end

Instance Method Details

#executeObject



15
16
17
18
19
# File 'app/finders/projects/topics_finder.rb', line 15

def execute
  topics = Projects::Topic.in_organization(organization_id).order_by_non_private_projects_count
  topics = by_without_projects(topics)
  by_search(topics)
end