debian-mirror-gitlab/app/controllers/confirmations_controller.rb

22 lines
503 B
Ruby
Raw Normal View History

2015-04-26 12:48:37 +05:30
class ConfirmationsController < Devise::ConfirmationsController
2016-06-02 11:05:42 +05:30
def almost_there
flash[:notice] = nil
render layout: "devise_empty"
end
2015-04-26 12:48:37 +05:30
protected
2016-06-02 11:05:42 +05:30
def after_resending_confirmation_instructions_path_for(resource)
users_almost_there_path
end
2015-04-26 12:48:37 +05:30
def after_confirmation_path_for(resource_name, resource)
if signed_in?(resource_name)
after_sign_in_path_for(resource)
else
2017-08-17 22:00:37 +05:30
flash[:notice] += " Please sign in."
new_session_path(resource_name)
2015-04-26 12:48:37 +05:30
end
end
end