Class: Tasks::Sources::BrowseController

Inherits:
ApplicationController
  • Object
show all
Includes:
TaskControllerConfiguration
Defined in:
app/controllers/tasks/sources/browse_controller.rb

Instance Method Summary (collapse)

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

- (Object) filter_params



16
17
18
# File 'app/controllers/tasks/sources/browse_controller.rb', line 16

def filter_params
  params.permit(:query_term).merge(project_id: sessions_current_project_id)
end

- (Object) find

GET



10
11
12
13
14
# File 'app/controllers/tasks/sources/browse_controller.rb', line 10

def find
  @terms = params[:query_term] 
  @sources = Queries::Source::Filter.new(filter_params).all.limit(500).distinct
  render :index
end

- (Object) index

GET



5
6
7
# File 'app/controllers/tasks/sources/browse_controller.rb', line 5

def index
  @sources = []
end