From b56921ca685f0b06000732520653470063a8c7de Mon Sep 17 00:00:00 2001 From: p31729568 Date: Thu, 13 Jun 2019 16:52:08 +0800 Subject: [PATCH] fix --- app/controllers/trainings_controller.rb | 2 +- app/views/trainings/enroll.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/trainings_controller.rb b/app/controllers/trainings_controller.rb index dfb7c716..9612c67f 100644 --- a/app/controllers/trainings_controller.rb +++ b/app/controllers/trainings_controller.rb @@ -3,7 +3,7 @@ require 'base64' class TrainingsController < ApplicationController wechat_responder - skip_before_filter :verify_signature, only: [:show, :create, :test] + skip_before_filter :verify_signature, only: [:show, :create, :update, :test, :enroll] ROOT_URL = ENV["wechat_url"] || "#{Setting.protocol}://#{Setting.host_name}" diff --git a/app/views/trainings/enroll.html.erb b/app/views/trainings/enroll.html.erb index 7cc642d2..02b5a4d9 100644 --- a/app/views/trainings/enroll.html.erb +++ b/app/views/trainings/enroll.html.erb @@ -125,7 +125,7 @@ <% end %>

<%= @training_title %>

- <%= form_for @training do |f| %> + <%= form_for (@training || Training.new) do |f| %> <%= hidden_field_tag(:tag_id, @tag_id) %>

基本信息