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.
21 lines
441 B
21 lines
441 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(:name, :parent_id, :state, doctrine_ids: [], exclude_ids: []) |
|
end |
|
end |
|
|
|
end |