Permalink
Browse files

always log database queries to STDOUT if in irb

  • Loading branch information...
1 parent 78daea5 commit 26d0a1411877a256a21765eb919d50e826443575 @mislav committed Dec 18, 2009
Showing with 4 additions and 1 deletion.
  1. +4 −1 app.rb
View
5 app.rb
@@ -23,8 +23,11 @@ def self.config
use Twitter::OAuthLogin, :key => Egotrip.config[:oauth][:key], :secret => Egotrip.config[:oauth][:secret]
helpers Twitter::OAuthLogin::Helpers
-configure :development, :production do
+configure do
DataMapper::Logger.new(STDOUT, :debug) if 'irb' == $0
+end
+
+configure :development, :production do
DataMapper.setup(:default, Egotrip.config[:database])
end

0 comments on commit 26d0a14

Please sign in to comment.