makes devise remember the last visited page before login in
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
class Users::SessionsController < Devise::SessionsController
|
||||
|
||||
def after_sign_in_path_for(resource)
|
||||
if !verifying_via_email? && resource.show_welcome_screen?
|
||||
welcome_path
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def after_sign_in_path_for(resource)
|
||||
if !verifying_via_email? && resource.show_welcome_screen?
|
||||
welcome_path
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
def verifying_via_email?
|
||||
return false unless resource.present?
|
||||
stored_path = session[stored_location_key_for(resource)] || ""
|
||||
|
||||
Reference in New Issue
Block a user