forked from spen/seminar
gotcha verification
This commit is contained in:
parent
df953bda4b
commit
18076d343d
|
@ -135,7 +135,7 @@ class SeminarsController < ApplicationController
|
|||
@signup = SeminarSignup.where(email: params[:seminar_signup][:email], seminar_main_id: params[:seminar_signup][:seminar_main_id] ).first
|
||||
|
||||
@seminar_signup = SeminarSignup.new(seminar_signup_params)
|
||||
|
||||
if gotcha_valid?
|
||||
if @signup.blank? && @seminar_signup.save
|
||||
# if gotcha_valid? && @seminar_signup.save
|
||||
|
||||
|
@ -154,6 +154,9 @@ class SeminarsController < ApplicationController
|
|||
redirect_to "#{params[:referer_url]}", :notice => t('recaptcha.errors.verification_failed')
|
||||
end
|
||||
end
|
||||
else
|
||||
redirect_to "#{params[:referer_url]}", :notice => t('recaptcha.errors.verification_failed')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ class SeminarSignupValue
|
|||
@seminar_signup_field_value.update(field_value_param) rescue nil
|
||||
@seminar_signup_field_value.save rescue nil
|
||||
else
|
||||
@seminar_signup_field_value = member.seminar_signup_values.build(field_value_param) #rescue nil
|
||||
@seminar_signup_field_value = member.seminar_signup_values.build(field_value_param) rescue nil
|
||||
@seminar_signup_field_value.save
|
||||
end
|
||||
return @seminar_signup_field_value
|
||||
|
|
Loading…
Reference in New Issue