Method: Janus::PasswordsController#redirect_after_password_change

Defined in:
lib/janus/controllers/passwords_controller.rb

#redirect_after_password_change(resource, options = {}) ⇒ Object

Either redirects the user to after_password_change_url or to params[:return_to] if present.



76
77
78
79
80
81
82
# File 'lib/janus/controllers/passwords_controller.rb', line 76

def redirect_after_password_change(resource, options = {})
  if params[:return_to].present?
    redirect_to params[:return_to], options
  else
    redirect_to after_password_change_url(resource), options
  end
end