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

Refactor Ability#can? method #12

Closed
ryanb opened this issue Nov 25, 2009 · 1 comment
Closed

Refactor Ability#can? method #12

ryanb opened this issue Nov 25, 2009 · 1 comment

Comments

@ryanb
Copy link
Owner

ryanb commented Nov 25, 2009

The can? method is currently one of the most complex methods in CanCan. It could use some refactoring! Splitting it up into some private methods would probably be best.

Alternatively I could create a separate AbilityCheck object which would reduce the amount of parameter passing across methods, but I'm concerned about performance since the can? method is triggered frequently in many applications.

I wonder if I can move some of the checking logic to up-front inside the can call. I'll have to look into that as well.

@ryanb
Copy link
Owner Author

ryanb commented Nov 26, 2009

refactoring ability can? method - closed by c40490d

This issue was closed.
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