Displaying 2 results from an estimated 2 matches for "active_record_io_mod".
Did you mean:
active_record_io_mode
2006 Apr 20
5
How to find the last SQL statement executed in ActiveRecord
Is there a method for retrieving the last SQL statement executed by
ActiveRecord? I realize I can open the log file, but I''m looking for a
programmatic way.
--
Posted via http://www.ruby-forum.com/.
2006 Apr 20
0
ActiveRecord IO Mode Plugin
...on 0.0.1. It allows you to redirect where sql statements are sent.
By default they are sent to a database connection, with the IO Mode plugin you can proxy them wherever you want. They can be sent
to any object that responds to the method <<
The link:
http://www.mktec.com/oss/rails-plugins/active_record_io_mode.0.0.1.tgz
Once installed in the vendor/plugins directory you can test this by
running "ruby script/console" from the RAILS_ROOT, and doing something
similar to:
# to redirect sql to an array
>> arr = []
>> ActiveRecord::Base.send_sql_to arr
=> true
# let'&...