Jakob Cosoroaba
Jakob Cosoroaba

Reputation: 1712

Dump queries made by ActiveRecord to file?

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?

Upvotes: 0

Views: 1108

Answers (1)

Simone Carletti
Simone Carletti

Reputation: 176352

Check out this answer. How do I get the last SQL query performed by ActiveRecord in Ruby on Rails?

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

Upvotes: 1

Related Questions