From 13f7d8c06f780f923e2af68297a6ef6cfc19e80c Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 31 Dec 2019 11:25:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admins/base_controller.rb | 1 - app/controllers/application_controller.rb | 2 +- app/controllers/schools_controller.rb | 1 - app/views/admins/shared/_sidebar.html.erb | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/admins/base_controller.rb b/app/controllers/admins/base_controller.rb index 9a4a25013..0451b77d1 100644 --- a/app/controllers/admins/base_controller.rb +++ b/app/controllers/admins/base_controller.rb @@ -6,7 +6,6 @@ class Admins::BaseController < ApplicationController layout 'admin' skip_before_action :verify_authenticity_token - before_action :require_login, :require_admin! after_action :rebind_event_if_ajax_render_partial diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 4faa42107..ba246829d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -282,7 +282,7 @@ class ApplicationController < ActionController::Base end def user_setup - # reacct静态资源加载不需要走这一步 + # # reacct静态资源加载不需要走这一步 return if params[:controller] == "main" # Find the current user Rails.logger.info("current_laboratory is #{current_laboratory} domain is #{request.subdomain}") diff --git a/app/controllers/schools_controller.rb b/app/controllers/schools_controller.rb index dc9f6c091..ae0315cdd 100644 --- a/app/controllers/schools_controller.rb +++ b/app/controllers/schools_controller.rb @@ -15,7 +15,6 @@ class SchoolsController < ApplicationController schools = School.all keyword = params[:keyword].to_s.strip schools = schools.where('name LIKE ?', "%#{keyword}%") if keyword - render_ok(schools: schools.select(:id, :name).as_json) end diff --git a/app/views/admins/shared/_sidebar.html.erb b/app/views/admins/shared/_sidebar.html.erb index 4b84068e7..09c115b06 100644 --- a/app/views/admins/shared/_sidebar.html.erb +++ b/app/views/admins/shared/_sidebar.html.erb @@ -2,7 +2,7 @@