Rubytastic
Rubytastic

Reputation: 15491

disable query logging in rails 3.2.x for development?

I followed all topics on disabling SQL query logging for active record. Who knows how to disable it correctly in rails 3.2.x ?

Upvotes: 4

Views: 1340

Answers (1)

Michael
Michael

Reputation: 20049

Give this a try - sends the active record logging to null:

if Rails.env.development?
    ActiveRecord::Base.logger = Logger.new('/dev/null')
end

Upvotes: 8

Related Questions