search for: theprimarykeyfororder

Displaying 1 result from an estimated 1 matches for "theprimarykeyfororder".

2006 Mar 14
4
has_one
...h has_many and a finder_sql statement on it, but that returns an array, so I have to access it like this: order.cardTypes[0].shortName The has_one below doesn''t really work, because the sql query ends up looks something like this: select * from cardTypes where cardTypes.id = ''theprimarykeyfororder'' and cardTypes.id = ''blah'' I don''t want the cardTypes.id = ''theprimarykey" part in there. Any help is greatly appriciated. My Order model is below: class Order < ActiveRecord::Base set_primary_key "customerId" belongs_to :account...