docbrown/app/controllers/registrations_controller.rb
rhymes 1b60ee5009 Use timezone aware methods (#893)
* Use timezone aware datetime methods

* Use timezone aware date parse for GitHub issue tag

* Introduce a bit of chaos programming using Zonebie

Zonebie uses a random timezone to run tests, it's a really good way to see if the code is timezone dependent or not.

* Convert GitHub issue date as UTC
2018-10-18 16:26:29 -04:00

12 lines
332 B
Ruby

class RegistrationsController < Devise::RegistrationsController
prepend_before_action :require_no_authentication, only: []
# No authorization required for public registration route
def new
if user_signed_in?
redirect_to "/dashboard?signed-in-already&t=#{Time.current.to_i}"
return
end
super
end
end