Forum: Ruby on Rails ActiveRecord trace sql

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7984f85eb1ace0ff40f2433ce26a95a1?d=identicon&s=25 p.m. (Guest)
on 2006-05-24 13:46
Is there way to trace sql for certain object? For example: I would like
to store i n db full sql query.
@firm = Firm.find(all, :conditions => ["visible = ?", 1])
Is there method for @firm which gives me : "SELECT * FROM firms WHERE
visible = 1" thx
This topic is locked and can not be replied to.