app/controllers/registrations_controller.rb
def check_new_registration_allowed?
    return true if Setting.allow_signup?

    redirect_to root_path
    flash[:alert] = 'New pilot registration is currently disabled'
  end
# Ensures that new signup is allowed before processing
# the registration or redirects back to the join page
#
Ensures that new signup is allowed before processing
the registration or redirects back to the join page
Ensures that new signup is allowed before processing the registration or redirects back to the join page
def check_new_registration_allowed?
    return true if Setting.allow_signup?
    redirect_to root_path
    flash[:alert] = 'New pilot registration is currently disabled'
  end
def check_new_registration_allowed? return true if Setting . allow_signup? redirect_to root_path flash [ :alert ] = 'New pilot registration is currently disabled' end
Ensures that new signup is allowed before processing
the registration or redirects back to the join page
Ensures that new signup is allowed before processing the registration or redirects back to the join page