Forum: Ruby on Rails normalized table query not working now

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.
8133ee52ca72188132b5c7d97dfb967f?d=identicon&s=25 Chris Habgood (chabgood)
on 2009-03-12 18:58
(Received via mailing list)
I have a Card table that previously had all of the data in it.  I made
a quite few tables and pulled the duplicated data into their own
I was doing this:
@cards = Card.find_all_by_node_id(, :conditions =>
["HwDescription like ? OR HwDescription like ?","%OC%","%DS-1%"])

Now that is broken as the data is in a hwdescriptions table.

Any idea how to do this same query with a one-one relationship?
80e4cb97cae5c8d745f72337d93fd8f2?d=identicon&s=25 MaD (Guest)
on 2009-03-13 08:21
(Received via mailing list)
take a look at the :include => :modelname option.
This topic is locked and can not be replied to.