Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Only load necessary abilities? #1020

Open
johncox00 opened this issue Oct 21, 2014 · 0 comments
Open

Only load necessary abilities? #1020

johncox00 opened this issue Oct 21, 2014 · 0 comments

Comments

@johncox00
Copy link

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant