views:

818

answers:

5

Hi,

Which is the most popular Ruby on Rails AUTHORIZATION gem/plugin at the moment?

(I am using AuthLogic for authentication by the way)

Thanks

+4  A: 

I like Declarative Authorization There is a pretty good railscast for it as well

raytiley
Weird, link doesn't work on link click in FF3, but a copy+paste works. Wonder if there's some referrer issue or something.
Kaleb Brasee
Thats so weird. If I click on the github link in firefox I get a not found error on github, but just hitting return again in the address bar loads the page. Clicking the same link in chrome works fine???
raytiley
+3  A: 

Not sure about the most popular solution, but Ryan Bates (of RailsCasts fame) recently released a new authorization plugin called CanCan that looks pretty easy to use and apparently integrates well with AuthLogic. Might be worth a look.

Declarative Authorization looks quite nice as well, though I haven't used it.

Mirko Froehlich
A: 

I'm looking to pick one of these two solutions. The main difference is the authors implementations of the same logic. DA is expressed with a DSL (like Rake) using roles, and CanCan is expressed using native Ruby includes and class methods.

I'm going to run with CanCan for now. It seems more natural and easier to work with since I use modules over Rake-style DSLs.

Ryan Bates, the author of CanCan posted this tweet, "CanCan vs Declarative Authorization...": twitter.com/rbates/status/5789648368

which linked to both implementations side-by-side: gist.github.com/236709

awesome
+3  A: 

Have a look @ Ruby-Toolbox - ruby-toolbox.com.

Specifically to answer your question, declarative_authorization is currently the most popular.

http://www.ruby-toolbox.com/categories/rails_authorization.html

They are listed in order of popularity. Have a glance at the right column "Popularity ranks" for a quick visual view.

johnsampson
A: 

I use Devise for auth and CanCan for roles. Here's how I do it if you want to take a look: http://www.tonyamoyal.com/2010/07/28/rails-authentication-with-devise-and-cancan-customizing-devise-controllers/

Tony