Forum: Ruby on Rails ActiveRecord question

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.
sky.yin (Guest)
on 2005-11-26 22:28
(Received via mailing list)
Hi all, I'm a newbie.

When I test some models in the console, how can I find the generated
sql at background?

Also, one of my table "quotes" has compound primary key "date" and
"ticker", how can I declare that as the foreign key of another table
"portfolios"? What's the convention here?


jasonlee9 (Guest)
on 2005-11-26 22:36
(Received via mailing list)
The test log output is in <your rails dir>/log/test.log

For the compound key, sorry, not sure.

- jason
sky.yin (Guest)
on 2005-11-27 01:26
(Received via mailing list)
Thanks, but there's nothing in test.log, only development.log repeating
I've seen in the console. I got "42000You have an error in your SQL
error message on Mysql5 when using join table, so I want to see what
the SQL is.
This topic is locked and can not be replied to.