Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

overriding RegistrationsController#create so there is no automatic si…

…gnin after signup
  • Loading branch information...
commit 20e870079080f4aa9b74988928236f4755496915 1 parent 15fd736
Zac Williams authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 app/controllers/registrations_controller.rb
6 app/controllers/registrations_controller.rb
View
@@ -9,18 +9,22 @@ def new
render_with_scope :new
end
+ # Overriding the default devise create action
+ # instead of signing in, we just redirect to the new users domain
# POST /resource
def create
+ logger.info "OVERRIDDEN CREATE"
build_resource
if resource.save
set_flash_message :notice, :signed_up
- sign_in_and_redirect(resource_name, resource)
+ redirect_to after_sign_in_path_for(resource)
else
render_with_scope :new
end
end
+
# GET /resource/edit
def edit
render_with_scope :edit
Please sign in to comment.
Something went wrong with that request. Please try again.