use Ability#initialize instead of prepare #4

Closed
ryanb opened this Issue Nov 17, 2009 · 1 comment

Comments

Projects
None yet
1 participant
@ryanb
Owner

ryanb commented Nov 17, 2009

Use Ability#initialize instead of Ability#prepare. This way it follows Ruby's convention better and simplifies the current_ability method in the controller.

My original reason for not defaulting to initialize is because I didn't want it to interfere with an existing initialize method which one may be using. For example, if someone wants to turn the Ability class into an ActiveRecord object which is stored in the database they should be able to.

However this would still be possible with initialize. One would simply need to override the current_ability method in the controller and setup the Ability class the way they want.

@ryanb

This comment has been minimized.

Show comment Hide comment
@ryanb

ryanb Nov 17, 2009

Owner

BACKWARDS INCOMPATIBLE: use Ability#initialize instead of 'prepare' to set up abilities - closed by 1edf583

Owner

ryanb commented Nov 17, 2009

BACKWARDS INCOMPATIBLE: use Ability#initialize instead of 'prepare' to set up abilities - closed by 1edf583

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment