Has anyone successfully gotten the scoped_access[1] plugin to work in
Rails 1.1? Some of the methods it was relying on are now no longer
accessible. It seems the only way to add scope is to use the
‘with_scope’ method that takes a block, but since Rails doesn’t have
real around filters[2] I cannot see a way of adding a scope using a
filter.
Anyone using with_scope and filters that can shed any light?
Cheers,
Jon
[1] http://habtm.com/articles/2006/02/22/nested-with_scope
[2] “around” was originally defined in CLOS (Common Lisp) 30 years ago.
It’s when some form of interceptor is called and is given full control
of calling the next interceptor in the chain. “around” is simple yet
incredibly powerful and can not only be used to implement “before” and
“after” but all sorts of crazy interception types. I’m slightly
disappointed Rails doesn’t have real “around” but hey, maybe I should
just submit a patch!