On Dec 28, 9:54 am, Leonardo Wong <[email protected]> wrote:
> I read 
> these:http://www.ruby-forum.com/topic/185297#newhttp://www.freezzo.com/2008/05/14/override-default-find-conditions-fo...
>
> it works, it override the .find perfectly, however it does not cover
> .find_by_id or other .find_by_XXX
>
> Is there anyway to override all the find function of a modal? I want to
> set the default "select" for User modal, only return name and id, but
> not the password by default.
>

default_scope ?

The methods linked above should also work in recent versions of rails
- find_by_xxx used to call find_every/find_initial directly but now
calls find.

Fred
> Thanks
> --
> Posted viahttp://www.ruby-forum.com/.

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to