binds pry console reload to set tenant automatically
Hi guys, I changed my .pryrc to set a Tenant automatically after go inside the console
# select tenant when entering console
class WelcomeClass
def self.select_tenant
# ActsAsTenant.current_tenant = Account.find 123
ActsAsTenant.current_tenant = Account.first
end
end
# run the code at `bin/rails console`
Pry.config.exec_string = WelcomeClass.select_tenantFor dev purpose, this is really helpful. I'm looking for a way to auto set the tenant after execute a "reload!" inside the console. Did you find a way to bind the reload method?
Notifications
You’re not receiving notifications from this thread.