mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-07 21:51:42 +08:00
init project
This commit is contained in:
13
app/controllers/departments_controller.rb
Normal file
13
app/controllers/departments_controller.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class DepartmentsController < ApplicationController
|
||||
skip_before_action :check_sign
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user