Implement your own find, do whatever you like to the parameters and
then call the main ActiveRecord find.

Look into the alias method.

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
>
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to