Here there is a tip:

http://rubyquicktips.tumblr.com/post/292826666/display-activerecord-generated-sql-queries-in-the

In order to make it work for both Rails 2 and Rails 3, my ~/irbrc looks 
like:

require 'logger'
if ENV.include?('RAILS_ENV')&& 
!Object.const_defined?('RAILS_DEFAULT_LOGGER')
   Object.const_set('RAILS_DEFAULT_LOGGER', Logger.new(STDOUT))
else
   ActiveRecord::Base.logger = Logger.new(STDOUT)
end

...not sure though if there is a better way to do that... bye.
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to