Created
April 3, 2014 14:37
-
-
Save qickstarter/9955535 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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