ActiveRecord question

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?

Thanks

Sky

The test log output is in /log/test.log

For the compound key, sorry, not sure.

  • jason

Thanks, but there’s nothing in test.log, only development.log repeating
what
I’ve seen in the console. I got “42000You have an error in your SQL
syntax”
error message on Mysql5 when using join table, so I want to see what
exactly
the SQL is.