RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Monkey patch for CanCan 1.6.7 to replace MetaWhere with Squeel

Since MetaWhere is not compatible with Rails 3.1/3.2 and we are now directed to use Squeel instead, and I needed to use CanCan MetaWhere depending functionality, I made this gist that replaces MetaWhere with Squeel in CanCan 1.6.7 . Now one can write:

can :manage, User, :permissions.outer => {:type.matches => 'Manage%'}}

This fixes several issues. Happy coding!

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in
×
Warning
User profile pages are not currently available, they will return soon