Jon Tirsen
2006-Mar-30 22:58 UTC
[Rails] with_scope and filters for Rails 1.1 (scoped_access plugin)
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! -- Posted via http://www.ruby-forum.com/.
Justin Forder
2006-Mar-31 04:09 UTC
[Rails] with_scope and filters for Rails 1.1 (scoped_access plugin)
Jon Tirsen wrote:> [2] "around" was originally defined in CLOS (Common Lisp) 30 years ago.Less than 20 years - Common Lisp itself (without CLOS) came out in 1984, and CLOS was added around 1988.> 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!
Jon Tirsen
2006-Mar-31 05:04 UTC
[Rails] Re: with_scope and filters for Rails 1.1 (scoped_access plug
Justin Forder wrote:> Less than 20 years - Common Lisp itself (without CLOS) came out in 1984, > and CLOS was added around 1988.I stand corrected. -- Posted via http://www.ruby-forum.com/.
Jeroen Houben
2006-Mar-31 08:08 UTC
[Rails] with_scope and filters for Rails 1.1 (scoped_access plugin)
Jon Tirsen wrote:> Has anyone successfully gotten the scoped_access[1] plugin to work in > Rails 1.1?I thought scoped_access was now built into 1.1 so no need for a plugin anymore, but I could be wrong... Jeroen
Justin Forder
2006-Apr-02 03:06 UTC
[Rails] Re: with_scope and filters for Rails 1.1 (scoped_access plug
Jon Tirsen wrote:> Justin Forder wrote: >> Less than 20 years - Common Lisp itself (without CLOS) came out in 1984, >> and CLOS was added around 1988. > > I stand corrected.Sorry to be picky... I was using Interlisp-D and LOOPS (precursor to CLOS) in 1984, then Common Lisp and CLOS on Macintosh around 1990. I must get back up to speed with Common Lisp. One of my colleagues from the 90''s has managed to stay with Common Lisp, exclusively... and another is running a company specialising in Erlang, another language on my list.