Inside a controller I've tried to run this code for when users that are already logged in stumble across the sign up page
def index
if current_user
redirect_to homebase_url #should provide url to home for logged in users
end
end
I've done what the rails error message said and have added: include Rails.application.routes.url_helpers
to the containing controller class. Still getting this error though. Definitely do not want to hardcode URLs into there for legacy purposes. Thanks