Account.sole → Current.account

and some other de-tenant changes, including removing the controller
tenanting concerns
This commit is contained in:
Mike Dalessio
2025-11-10 07:58:40 -05:00
parent 6705b5225f
commit d41d50d52b
40 changed files with 67 additions and 96 deletions
+3 -3
View File
@@ -1,5 +1,4 @@
class JoinCodesController < ApplicationController
require_untenanted_access
allow_unauthenticated_access
before_action :set_join_code
before_action :ensure_join_code_is_valid
@@ -7,7 +6,7 @@ class JoinCodesController < ApplicationController
layout "public"
def new
@account_name = ApplicationRecord.with_tenant(tenant) { Account.sole.name }
@account_name = Current.account.name
end
def create
@@ -30,7 +29,8 @@ class JoinCodesController < ApplicationController
end
def set_join_code
@join_code ||= ApplicationRecord.with_tenant(tenant) { Account::JoinCode.active.find_by(code: code) }
# TODO:PLANB: this find should be scoped by account
@join_code ||= Account::JoinCode.active.find_by(code: code)
end
def tenant