Skip to content

Instantly share code, notes, and snippets.

@qickstarter
Created April 3, 2014 14:37
Show Gist options
  • Save qickstarter/9955535 to your computer and use it in GitHub Desktop.
Save qickstarter/9955535 to your computer and use it in GitHub Desktop.
- devise_for module_name
- Devise::Mapping
- @scoped_path = options[:as] ? "#{options[:as]}/#{name}" : name.to_s
- @class_name = (options[:class_name] || name.to_s.classify).to_s
```ruby
# Devise::ConfirmationsController#show
def show
self.resource = resource_class.confirm_by_token(params[:confirmation_token])
if resource.errors.empty?
set_flash_message(:notice, :confirmed) if is_navigational_format?
sign_in(resource_name, resource)
respond_with_navigational(resource){ redirect_to after_confirmation_path_for(resource_name, resource) }
else
respond_with_navigational(resource.errors, :status => :unprocessable_entity){ render :new }
end
end
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment