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
{{ message }}
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
I have an application with quite a few models and lots of "cans" and "cannots" associated with those models. The problem I'm running into is that running the initialize method on ability.rb makes quite a few database calls and the aggregate time to authorize a user per call into my API is quite long before I even execute code based on the authorization.
Is there a way to only run the ability definitions necessary for specific logic? Almost like lazy loading abilities? Am I missing something?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have an application with quite a few models and lots of "cans" and "cannots" associated with those models. The problem I'm running into is that running the initialize method on ability.rb makes quite a few database calls and the aggregate time to authorize a user per call into my API is quite long before I even execute code based on the authorization.
Is there a way to only run the ability definitions necessary for specific logic? Almost like lazy loading abilities? Am I missing something?
The text was updated successfully, but these errors were encountered: