diff --git a/config/initializers/tenanting/logging.rb b/config/initializers/tenanting/logging.rb index 08733395b4..a8b834f310 100644 --- a/config/initializers/tenanting/logging.rb +++ b/config/initializers/tenanting/logging.rb @@ -1,4 +1,7 @@ -# # TODO:PLANB: we should log account id -# ActiveSupport.on_load(:action_controller_base) do -# before_action { logger.struct tenant: ApplicationRecord.current_tenant } -# end +ActiveSupport.on_load(:action_controller_base) do + before_action do + if Current.account.present? + logger.try(:struct, account: { queenbee_id: Current.account.external_account_id }) + end + end +end diff --git a/lib/tasks/seed.rake b/lib/tasks/seed.rake deleted file mode 100644 index e6ae37ba6e..0000000000 --- a/lib/tasks/seed.rake +++ /dev/null @@ -1,12 +0,0 @@ -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 "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! - - # puts "✓ Seeded account #{account.name} (tenant: #{account.id})" - end -end diff --git a/test/test_helper.rb b/test/test_helper.rb index d370c51aea..bad1fdb2a1 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -48,8 +48,6 @@ class TestCase include Turbo::Broadcastable::TestHelper setup do - # TODO:PLANB: this is hacky, we should sort through the `Current` dependencies and figure out - # how to set Current.user without needing both a session *and* an account Current.account = accounts("37s") end