Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative for CanCan? [closed]

I use rspec, devise and cancan at the moment. To be honest, I find cancan to be very confusing and I am encountering a lot difficulties in picking it up and using it effectively. The docs are not very in depth making this extremely difficult for me to debug (check my past questions).

Is there an alternative to CanCan that's also easily integratable in the other tools I am using?

like image 539
disappearedng Avatar asked Aug 27 '11 10:08

disappearedng


People also ask

Is Can Can lehenga necessary?

The can can also depends on the type of fabric your lehenga is. If your lehenga is heavy, say velvet - you may need slightly more than usual can can to keep it flared out. But a fabric like raw silk, flares out on its own and can do with minimal can can.

Can I remove CanCan from my lehenga?

You can do without can-can Can-can definitely makes your lehenga looks fluffy and gorgeous but, you cannot simply ignore the fact that it adds a lot of weight. You can do without a can-can. Get this extra layer removed and you will feel very easy and comfortable in your heavy lehenga.

Can you iron CanCan?

To iron the skirt, you have two options: iron on low (silk setting - which will take a long time) or set your iron to its highest setting (with steam) and use a white cotton pillow case as a barrier between the skirt and iron. This will speed up the ironing process and result in a beautiful cancan skirt ready to wear!

What is the meaning of CAN in lehenga?

Can can is a mesh or net-like material that can be attached underneath your lehenga to give it the royal flare. Can can comes in two varieties: hard and soft. Adding a can can skirt to your conventional lehenga props it outwards, dependant on the kind that your choose.


2 Answers

As of early 2014, Pundit is a popular alternative to CanCan (and the successor CanCanCan). Pundit matches each controller with a policy object. Unlike CanCan, there's no central rule file for all access control. It's simpler than CanCan. There's an example app from the RailsApps project:

Rails Pundit Example

I've also written a tutorial on Rails Authorization with Pundit.

Another alternative is the Authority gem from Nathan Long. All your rules logic goes in Ruby classes called "authorizers" that are associated with models.

like image 120
Daniel Kehoe Avatar answered Oct 03 '22 00:10

Daniel Kehoe


Some guys are continuing the development of cancan. Check it out:

https://github.com/CanCanCommunity/cancancan

like image 37
Zeck Avatar answered Oct 03 '22 02:10

Zeck