From d7651a1716332a600eabb80d0f8398b09c6738e1 Mon Sep 17 00:00:00 2001 From: Bomrah Harry Date: Fri, 27 Oct 2023 20:06:14 +0800 Subject: [PATCH] fix email and name issue --- app/controllers/seminars_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/seminars_controller.rb b/app/controllers/seminars_controller.rb index f7718c3..afcc20f 100644 --- a/app/controllers/seminars_controller.rb +++ b/app/controllers/seminars_controller.rb @@ -495,7 +495,10 @@ class SeminarsController < ApplicationController end end end - @signup = SeminarSignup.where(name: params[:seminar_signup][:name], email: params[:seminar_signup][:email], seminar_main_id: seminar_id ).first + @signup = SeminarSignup.where(email: params[:seminar_signup][:email], seminar_main_id: seminar_id ).first + if @signup.blank? + @signup = SeminarSignup.where(name: params[:seminar_signup][:name], seminar_main_id: seminar_id ).first + end @seminar_signup = SeminarSignup.new(seminar_signup_params) not_signup_yet = @signup.blank?