Forum: Ruby on Rails ActiveRecord trace sql

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.
p.m. (Guest)
on 2006-05-24 15: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.