You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
468 B

module Api
class SubjectsController < BaseController
include SubjectSearch
authorize_resource :doctrine, class: "Cdao::Subject", only: %i[index]
def index
@search = search_subject(search_params)
@subjects = @search.results
respond_with @subjects
end
private
def search_params
params.permit(:q, :name, :parent_id, :state, :doctrine_ids, :is_root, :page, :per_page, exclude_ids: [])
end
end
end