From 5d2ca6759d9ccc18cf72e313f176b94ab58fc659 Mon Sep 17 00:00:00 2001 From: Kevin McConnell Date: Thu, 11 Dec 2025 09:00:51 +0000 Subject: [PATCH] Naming --- app/controllers/signups_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/signups_controller.rb b/app/controllers/signups_controller.rb index b9e12d759..56614158f 100644 --- a/app/controllers/signups_controller.rb +++ b/app/controllers/signups_controller.rb @@ -3,7 +3,7 @@ class SignupsController < ApplicationController allow_unauthenticated_access rate_limit to: 10, within: 3.minutes, only: :create, with: -> { redirect_to new_signup_path, alert: "Try again later." } before_action :redirect_authenticated_user - before_action :prevent_signup_when_users_exist + before_action :enforce_tenant_limit layout "public" @@ -25,11 +25,11 @@ class SignupsController < ApplicationController redirect_to new_signup_completion_path if authenticated? end + def enforce_tenant_limit + redirect_to new_session_url unless Account.accepting_signups? + end + def signup_params params.expect signup: :email_address end - - def prevent_signup_when_users_exist - redirect_to new_session_url unless Account.accepting_signups? - end end