Yeah, I know how to do it that way.
I'm just exploring other options.

On Saturday, April 22, 2006, at 7:40 PM, Tobias Lütke wrote:
>def find(*params)
>  [..] before find code
>  super
>end
>
>On 22 Apr 2006 23:09:07 -0000, Kevin Olbrich
><[EMAIL PROTECTED]> wrote:
>> Well, what I'm thinking of would be more like a class-level before_find.
>> I'd like to intercept the options going into 'find', and pre-process
>> them on a model-per-model basis, and then pass that along to 'find'.
>> The general idea is to give models an ability to restrict which users
>> can access individual records.  To make it clean, I'd like to build it
>> into the normal find process.
>>
>> So, yeah, a object level before_find doesn't make sense, but a class
>> level one does.  Sure, I could write a plugin to do this, but it would
>> essentially be adding a before_find call manually.
>>
>> On Saturday, April 22, 2006, at 4:49 PM, Rick Olson wrote:
>> >On 4/22/06, Tobias L�tke <[EMAIL PROTECTED]> wrote:
>> >> uh. because the objects are not instanciated/exist before they are
>> >> actually found. Or is this a philosophical question?
>> >
>> >Existential Rails Plugin :)
>> >
>> >Kevin: do you have a use case in mind?  Surely anything you want done
>> >before_find can be done before the find call?
>> >
>> >--
>> >Rick Olson
>> >http://techno-weenie.net
>> >_______________________________________________
>> >Rails-core mailing list
>> >Rails-core@lists.rubyonrails.org
>> >http://lists.rubyonrails.org/mailman/listinfo/rails-core
>>
>>
>> _Kevin
>>
>> --
>> Posted with http://DevLists.com.  Sign up and save your mailbox.
>> _______________________________________________
>> Rails-core mailing list
>> Rails-core@lists.rubyonrails.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails-core
>>
>
>
>--
>Tobi
>http://shopify.com       - modern e-commerce software
>http://typo.leetsoft.com - Open source weblog engine
>http://blog.leetsoft.com - Technical weblog
>
>_______________________________________________
>Rails-core mailing list
>Rails-core@lists.rubyonrails.org
>http://lists.rubyonrails.org/mailman/listinfo/rails-core
>


_Kevin

-- 
Posted with http://DevLists.com.  Sign up and save your mailbox.
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to