[Nitro] Og and 'duck typing' search

George Moschovitis george.moschovitis at gmail.com
Fri Jun 6 04:13:46 EDT 2008


No you should do it for all classes:

User.find_by_name(name)
Post.find_by_name(name)

etc...

-g.

On Fri, Jun 6, 2008 at 2:28 AM, Alexey Petrushin <lists at ruby-forum.com>
wrote:

> Can Og search for 'name' in all 'managed' classes?
>
> I.e. there are: Post, User, Topic, Comment, ..., and all of them have
> the 'name' property. So, can i use something like:
>
>        Og.search_by_name('my_name')?
>
> Or i should explicitly do it for all classes? I.e.:
>
>        Post.search_by_name('my_name').
>        concat(User.search_by_name('my_name')).
>        concat ...
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>



-- 
http://gmosx.me.gr
http://joy.gr
http://cull.gr
http://nitroproject.org
http://phidz.com
http://joyerz.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/nitro-general/attachments/20080606/a3a9c760/attachment.html>


More information about the Nitro-general mailing list