views:

33

answers:

1

Is there an easy way to dump / write the queries performed by ActiveRecord into a file? I know that they are in the log, but without parsing that? How can I get the queries?

+1  A: 

Check out this answer. http://stackoverflow.com/questions/1090801/how-do-i-get-the-last-sql-query-performed-by-activerecord-in-ruby-on-rails/1091006#1091006

You can easily update the method in order to save the queries into a file.

Simone Carletti
thx, I should have search more
Midday