Forum: Nitro Og and 'duck typing' search

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
62711fa2787e85b5f0c88e245ef69f54?d=identicon&s=25 Alexey Petrushin (axyd80)
on 2008-06-06 01:28
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:


Or i should explicitly do it for all classes? I.e.:

        concat ...
7a4e995e378ef66de0ceaea5e1381ee1?d=identicon&s=25 George Moschovitis (Guest)
on 2008-06-06 10:14
(Received via mailing list)
No you should do it for all classes:




On Fri, Jun 6, 2008 at 2:28 AM, Alexey Petrushin <>
Bd10252dc68b39171cc9bf5f74bcb9f1?d=identicon&s=25 Arne Brasseur (Guest)
on 2008-06-07 11:39
(Received via mailing list)
You should be able to do something like {|c| c.find_by_name(name)}.flatten

This topic is locked and can not be replied to.