Upgrading to Aegis 2
Clone this wiki locally
As of May 2010, Aegis has has matured to version 2 and offers a great new API with many new features. Here is how you take your Aegis 1 setup and migrate it to Aegis 2:
- In your
actionwhere you used to say
crud_somethingmacro is no longer available. Define your permissions using resources instead, which is much more expressive and compact.
- When you have an
denywith a block, that block should now take all the arguments, not the containing
- Blocks no longer need the accept the current user as the first argument. The current user can simply be refered to as
userinside the block.
- Check if your application rescues
Aegis::PermissionErrorsomewhere. That error has been renamed to
- Aegis 1 came with many default action aliases like
show => read. The only default aliases left are
edit => updateand
new => create. You can define new aliases.
- For the sake of consistency,
user.role.namenow returns a string instead of a symbol.
If you would like to do something with the old Aegis 1 code, we archived it into the aegis1 branch.