You can use the
currentuser_sign_up_url helper in your actions and views to allow a visitor to reach a sign-up form.
In a view:
<% # views/shared/_menu.html.erb %> <%= link_to 'Sign up', currentuser_sign_up_url %>
Or in a controller action:
# controllers/main_controller.rb class MainController < ApplicationController def sign_up redirect_to currentuser_sign_up_url end end
After signing up, the visitor is automatically authenticated in your application (see Authentication page).
before_action :require_currentuser(see Authentication page), a visitor reaching this action will be redirected to the sign-in form, which has a link to the sign-up form.