Displaying 1 result from an estimated 1 matches for "send_sql_to".
2006 Apr 20
0
ActiveRecord IO Mode Plugin
....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''s test it
>> Test.find :all, :limit => 1
=> []
>> arr
=> ["SELECT * FROM tests LIMIT 1;\n"]
# redirect sql back to our db connection
>> ActiveRecord::Base.send_sql_to :db
=> true
>> Test.find :all, :li...