Forum: Ruby on Rails with_scope and filters for Rails 1.1 (scoped_access plugin)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
28f935ff36b53c1b42faf29b1217fde5?d=identicon&s=25 Jon Tirsen (Guest)
on 2006-03-31 00:58
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!
Eea7ad39737b0dbf3de38874e0a6c7d8?d=identicon&s=25 Justin Forder (Guest)
on 2006-03-31 06:09
(Received via mailing list)
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.
28f935ff36b53c1b42faf29b1217fde5?d=identicon&s=25 Jon Tirsen (tirsen)
on 2006-03-31 07:01
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.
B9a732fc30c32098347a0177c75ee27b?d=identicon&s=25 Jeroen Houben (Guest)
on 2006-03-31 10:11
(Received via mailing list)
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
Eea7ad39737b0dbf3de38874e0a6c7d8?d=identicon&s=25 Justin Forder (Guest)
on 2006-04-02 05:08
(Received via mailing list)
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.
This topic is locked and can not be replied to.