Is there a way debug ActiveRecord queries before they are executed rather than after?
You can call .to_sql on the end of the query to output the sql that it generates like so:
SomeModel.where(:stuff => 'is here').to_sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With