app/controllers/registrations_controller.rb in milia-0.3.23 vs app/controllers/registrations_controller.rb in milia-0.3.24
- old
+ new
@@ -16,11 +16,11 @@
# ------------------------------------------------------------------------------
def create
sign_out_session!
- if verify_recaptcha # ?? does this need: :model => resource ??
+ if verify_recaptcha
Tenant.transaction do
@tenant = Tenant.create_new_tenant(params)
if @tenant.errors.empty? # tenant created
@@ -40,26 +40,27 @@
end # if .. then .. else no tenant errors
end # wrap tenant/user creation in a transaction
else
- flash[:error] = "Recaptcha code error; please re-enter the code and click submit again"
+ flash[:error] = "Recaptcha codes didn't match; please try again"
prep_signup_view( params[:tenant], params[:user], params[:coupon] )
render :new
end
end # def create
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
+
private
+
# ------------------------------------------------------------------------------
# sign_out_session! -- force the devise session signout
# ------------------------------------------------------------------------------
-
- def sign_out_session!()
- Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name) if user_signed_in?
- end
+ def sign_out_session!()
+ Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name) if user_signed_in?
+ end
# ------------------------------------------------------------------------------
# devise_create -- duplicate of Devise::RegistrationsController
# same as in devise gem EXCEPT need to prep signup form variables
# ------------------------------------------------------------------------------