RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

clyfe — 2 posts

http://clyfe.github.com/

I just ported Pythonic's acts as nested interval to Rails 3.
Nested interval is like nested set, only it's inserts are faster.

https://github.com/clyfe/acts_as_nested_interval

Currently adding a virtual root feature. There's also a project acts_as_nested_moebius on GH that implements a smarter nested interval (via Moebius encoding) that's better when moving subtrees. Would be nice to also have that one ported.
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!