You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using ActsAsTenant.
Recently, I wanted to change require_tenant dynamically because I plan to create an admin page.
So I looked at the README and rewrote acts_as_tenant.rb using lambda.
I believe this is just an example where you'd have to set a variable to access the request. @cmer made that PR to the Gemfile and can probably give some tips on that. #286
For example, you might want to use CurrentAttributes and set Current.request in a before_action so you can access it inside the lambda.
We may need to update the readme to show a complete example like that.
I am using ActsAsTenant.
Recently, I wanted to change require_tenant dynamically because I plan to create an admin page.
So I looked at the README and rewrote acts_as_tenant.rb using lambda.
cat config/initializers/acts_as_tenant.rb
But $request_env is always nil even though the controller is working, so $request_env.present? is still false
Is there any way to set require_tenant to false only for the /admin path?
The text was updated successfully, but these errors were encountered: