Account.sole → Current.account
and some other de-tenant changes, including removing the controller tenanting concerns
This commit is contained in:
+5
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user