Make autoloadable by Rails 3

This commit is contained in:
Evgeniy Dolzhenko 2010-09-03 04:40:07 -07:00
parent 81002e1ad3
commit c2c10eeca2

View File

@ -17,3 +17,9 @@ module SilentPostgres
METHOD METHOD
end end
end end
if %w(test development).include?(ENV["RAILS_ENV"])
puts "Silencing Postgres"
require 'silent_postgres'
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.send(:include, SilentPostgres)
end