public
Description: Collective Idea's Awesomeness. A collection of useful Rails bits and pieces.
Homepage:
Clone URL: git://github.com/collectiveidea/awesomeness.git
Click here to lend your support to: awesomeness and make a donation at www.pledgie.com !
awesomeness / lib / awesomeness.rb
100644 10 lines (9 sloc) 0.413 kb
1
2
3
4
5
6
7
8
9
10
Dir[File.dirname(__FILE__) + "/awesomeness/**/*.rb"].each {|f| require f }
 
# From: http://weblog.jamisbuck.org/2007/1/31/more-on-watching-activerecord
# Easy way to view logs in script/console.
# simply type: log_to(STDOUT)
# and all of your active record queries will show up inline.
def log_to(stream = STDOUT)
  ActiveRecord::Base.logger = Logger.new(stream)
  ActiveRecord::Base.clear_active_connections!
end