Update seminars_controller.rb

fix error
This commit is contained in:
chiu 2019-10-29 23:13:52 +08:00
parent 8edb6de807
commit e7a0d13a38
1 changed files with 7 additions and 11 deletions

View File

@ -1,7 +1,7 @@
class SeminarsController < ApplicationController
helper MemberHelper
include ActionView::Context
include ActionView::Context #vary important (only add this can access @@session from view)
include Admin::SeminarsHelper
# include SimpleCaptcha::ControllerHelpers
def index
@ -204,13 +204,11 @@ class SeminarsController < ApplicationController
def add_file
session = OrbitHelper.get_session
if !@@session[:seminar_main_id].blank?
if !session[:seminar_main_id].blank?
seminar = SeminarMain.find_by(id: @@session[:seminar_main_id])
seminar = SeminarMain.find_by(id: session[:seminar_main_id])
seminar_signup = SeminarSignup.find_by(_id: session[:seminar_signup_id], seminar_main_id: session[:seminar_main_id] )
seminar_signup = SeminarSignup.find_by(_id: @@session[:seminar_signup_id], seminar_main_id: @@session[:seminar_main_id] )
else
@ -245,13 +243,11 @@ class SeminarsController < ApplicationController
time_now = Time.now
session = OrbitHelper.get_session
if !@@session[:seminar_main_id].blank?
if !session[:seminar_main_id].blank?
seminar = SeminarMain.find_by(id: @@session[:seminar_main_id])
seminar = SeminarMain.find_by(id: session[:seminar_main_id])
seminar_signup = SeminarSignup.find_by(_id: session[:seminar_signup_id], seminar_main_id: session[:seminar_main_id] )
seminar_signup = SeminarSignup.find_by(_id: @@session[:seminar_signup_id], seminar_main_id: @@session[:seminar_main_id] )
else