Displaying 2 results from an estimated 2 matches for "mcdon".
Did you mean:
mcdn
2008 Dec 22
3
how to use set_primary_key?
We are trying to use set_primary_key to cause an existing rails db to
use a different primary key. This works find for accessing existing
data, but gives an error when we try to add a new record, as it seems
to still be accessing the record by the default id field at that
point. Are there other changes we need to make to get an alternate
primary key working?
Thanks,
Ken
2008 Dec 09
3
Problems with getting correct id from query involving two tables
I have a query that is intended to find all "transfers" based on a
condition the uses a second table. In the controller, it looks like
this:
def find_protocols
@transfers = Transfer.find(:all, :from => "transfers,
protocols", :conditions => "transfers.protocol_id = protocols.id AND
protocols.name = \"#{params[:protocol]}\"")
respond_to do