diff --git a/app/controllers/trainings_controller.rb b/app/controllers/trainings_controller.rb index 7b9164b5..40757ade 100644 --- a/app/controllers/trainings_controller.rb +++ b/app/controllers/trainings_controller.rb @@ -279,7 +279,7 @@ class TrainingsController < ApplicationController end def find_tag_id - @tag_id = params[:id] + @tag_id = params[:tag_id] || params[:id] Rails.logger.info("##########TAG_ID:#{@tag_id}") @training_type = @tag_id == "aeee0601_2019" ? 3 : @tag_id == "ceeaa06_2019" ? 4 : 0 render_404 if @training_type == 0 diff --git a/app/views/trainings/enroll.html.erb b/app/views/trainings/enroll.html.erb index 4def0abe..d6543a23 100644 --- a/app/views/trainings/enroll.html.erb +++ b/app/views/trainings/enroll.html.erb @@ -126,7 +126,7 @@
<%= @training_title %>
<%= form_for @training do |f| %> - <%= hidden_field_tag(:id, @tag_id) %> + <%= hidden_field_tag(:tag_id, @tag_id) %>基本信息