docbrown/app/controllers/registrations_controller.rb
rhymes 8407bf9b4e
[deploy] Authentication refactoring: cleanups (#7576)
* Use Devise registry to list available providers

* Cleanups following Devise+Omniauth docs

* More cleanups

* Use helpers

* More cleanups

* Oops, forgot to remove these specs
2020-04-29 10:33:30 -04:00

11 lines
231 B
Ruby

class RegistrationsController < Devise::RegistrationsController
prepend_before_action :require_no_authentication, only: []
def new
if user_signed_in?
redirect_to dashboard_path
else
super
end
end
end