Merge pull request #558 from differentreality/confirmations

sign in user after confirmation
This commit is contained in:
Henne Vogelsang 2014-12-05 16:24:19 +01:00
commit f91de69ede
2 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,12 @@
class ConfirmationsController < Devise::ConfirmationsController
protected
def after_confirmation_path_for(_resource_name, resource)
if signed_in?
signed_in_root_path(resource)
else
sign_in resource
root_path
end
end
end

View file

@ -5,7 +5,7 @@ Osem::Application.routes.draw do
else
devise_for :users,
controllers: {
registrations: :registrations,
registrations: :registrations, confirmations: :confirmations,
omniauth_callbacks: 'users/omniauth_callbacks' },
path: 'accounts'
end