diff --git a/app/controllers/trainings_controller.rb b/app/controllers/trainings_controller.rb index 0668edde..e3e96f11 100644 --- a/app/controllers/trainings_controller.rb +++ b/app/controllers/trainings_controller.rb @@ -112,6 +112,7 @@ class TrainingsController < ApplicationController @training.openid = session[:wechat_open_id] @training.save! + flash[:message] = '提交成功' redirect_to enroll_training_path(id: @tag_id) # redirect_to pay_training_path(id: @tag_id) end @@ -130,6 +131,7 @@ class TrainingsController < ApplicationController end @training.save! + flash[:message] = '提交成功' redirect_to enroll_training_path(id: @tag_id) # redirect_to pay_training_path(id: @tag_id) end @@ -252,7 +254,7 @@ class TrainingsController < ApplicationController def authenticate if Rails.env.development? - # session[:wechat_open_id] = "o5fSc0607iR3rp4-h_VnuBTp8CiM" + session[:wechat_open_id] = "o5fSc0607iR3rp4-h_VnuBTp8CiM" end unless session[:wechat_open_id].present? diff --git a/app/views/trainings/enroll.html.erb b/app/views/trainings/enroll.html.erb index 1362e78f..6b898691 100644 --- a/app/views/trainings/enroll.html.erb +++ b/app/views/trainings/enroll.html.erb @@ -205,27 +205,27 @@ <% end %> -
通讯地址
-