From 40c19ae0d5bac0660c3f87bc875db1eec7dc6e09 Mon Sep 17 00:00:00 2001 From: daiao <35855898@qq.com> Date: Thu, 21 Mar 2019 00:13:11 +0800 Subject: [PATCH] 1 --- app/controllers/ec_years_controller.rb | 2 +- app/views/ec_years/create.js.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/ec_years_controller.rb b/app/controllers/ec_years_controller.rb index 536359e8..4661fd7b 100644 --- a/app/controllers/ec_years_controller.rb +++ b/app/controllers/ec_years_controller.rb @@ -34,7 +34,7 @@ class EcYearsController < ApplicationController @major_manager = true @btn_text = @major_school.template_major && User.current.admin? ? "立即配置" : (!@major_school.template_major && @major_manager ? "立即配置" : "查看") - @years = @major_school.ec_years + @years = EcYear.where(:ec_major_school_id => @major_school.id) @years = paginateHelper @years, 10 respond_to do |format| format.js diff --git a/app/views/ec_years/create.js.erb b/app/views/ec_years/create.js.erb index a1991c62..52e00e4a 100644 --- a/app/views/ec_years/create.js.erb +++ b/app/views/ec_years/create.js.erb @@ -1,6 +1,6 @@ <% if @status.to_i == -1 %> notice_box("该界别已经存在,请勿重复创建") <% else %> - window.location.reload(); - //$("#year_list").html('<%#= j(render :partial => "ec_major_schools/year_list") %>') + //window.location.reload(); + $("#year_list").html('<%= j(render :partial => "ec_major_schools/year_list") %>') <% end %> \ No newline at end of file