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