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.
12 lines
266 B
12 lines
266 B
5 years ago
|
class DepartmentsController < ApplicationController
|
||
|
|
||
|
def for_option
|
||
|
render_ok(departments: current_school.departments.without_deleted.select(:id, :name).as_json)
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def current_school
|
||
|
@_current_school ||= School.find(params[:id])
|
||
|
end
|
||
|
end
|