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
+5 -4
View File
@@ -1,11 +1,12 @@
namespace :seed do
desc "Seed customer data for a specific account (e.g: rails seed:customer ARTENANT=1234)"
task :customer, [ :tenant_id ] => "db:tenant" do |t, args|
raise "Please provide a tenant ID: rails seed:customer ARTENANT=1234" unless ApplicationRecord.current_tenant
raise "TODO:PLANB: Need to re-implement this task for untenanted context"
# raise "Please provide a tenant ID: rails seed:customer ARTENANT=1234" unless ApplicationRecord.current_tenant
account = Account.sole
Account::Seeder.new(account, User.active.first).seed!
# account = Account.sole
# Account::Seeder.new(account, User.active.first).seed!
puts "✓ Seeded account #{account.name} (tenant: #{account.id})"
# puts "✓ Seeded account #{account.name} (tenant: #{account.id})"
end
end