Closed ConfusedVorlon closed 1 year ago
In application.rb
you can do
module YourApp
class Application < Rails::Application
# ...
console do
ActsAsTenant.require_tenant = false
# or
ActsAsTenant.current_tenant = Tenant.first
end
end
end
That's great - thank you.
One minor change. The config isn't directly accessible (as far as I can tell), so it needs
module YourApp
class Application < Rails::Application
# ...
console do
ActsAsTenant.configure do |config|
config.require_tenant = false
end
end
end
end
I love this gem - so firstly, thank you for creating it.
I run things with
config.require_tenant = true
this is brilliant, and it stops me from accidentally shooting myself in the foot.However - it is annoying when I'm debugging in the console.
Is there a way for me to turn off require_tenant = true other than wrapping commands in a block?
e.g.
ActsAsDenant.beChillForThisSessionPlease()
(syntax might vary!)