I'm looking for a way to store the sql string that is generated in an update or create action. I've tried appending .to_sql
to the end of update_attributes
but it returns a TrueClass
error (or something like that). Is there something that I am missing?
相关问题
- Eager-loading association count with Arel (Rails 3
- How to specify memcache server to Rack::Session::M
- Why am I getting a “C compiler cannot create execu
- reference to a method?
- ruby 1.9 wrong file encoding on windows
相关文章
- Ruby using wrong version of openssl
- Difference between Thread#run and Thread#wakeup?
- how to call a active record named scope with a str
- “No explicit conversion of Symbol into String” for
- Rspec controller error expecting <“index”> but
- Factory_girl has_one relation with validates_prese
- Segmentation fault with ruby 2.0.0p247 leading to
- How to detect if an element exists in Watir
These methods both return a boolean. You can't invoke
to_sql
on a boolean.credits:
https://stackoverflow.com/a/1629474/643500
https://stackoverflow.com/a/1640560/643500