Skip to content

Instantly share code, notes, and snippets.

@frankjmattia
Created June 28, 2010 17:19
Show Gist options
  • Save frankjmattia/456119 to your computer and use it in GitHub Desktop.
Save frankjmattia/456119 to your computer and use it in GitHub Desktop.
class Users::RegistrationsController < Devise::RegistrationsController
def create
build_resource
if resource.save
set_flash_message :notice, :signed_up
if resource.confirmed?
sign_in_and_redirect(resource_name, resource)
else
redirect_to some_other_url
end
else
clean_up_passwords(resource)
render_with_scope :new
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment