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.
Cee38055ae36590c654c04c2d5cc2778?d=identicon&s=25 sky.yin (Guest)
on 2005-11-26 21: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?


9a5c497293dffb91cacef202bad5b602?d=identicon&s=25 jasonlee9 (Guest)
on 2005-11-26 21: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
Cee38055ae36590c654c04c2d5cc2778?d=identicon&s=25 sky.yin (Guest)
on 2005-11-27 00: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.