Class: Recruiter::FiltersController
Instance Method Summary
collapse
#page, #per_page
#crud_flash, #set_crud_error_flash, #set_crud_success_flash
Instance Method Details
#index ⇒ Object
3
4
5
6
7
8
|
# File 'app/controllers/recruiter/filters_controller.rb', line 3
def index
@records = ::Recruiter::Filters.filter(type, params).map do |record|
{ id: record.id, name: record.name }
end
render json: @records
end
|
#type ⇒ Object
10
11
12
|
# File 'app/controllers/recruiter/filters_controller.rb', line 10
def type
params.require(:filter)
end
|