From de24ed9f2d582096fcc5b83984f187c2a094e83a Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 3 Dec 2011 14:26:34 +0100 Subject: removes the convenience instance version of AR::Base.silence_auto_explain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rationale: As discussed with José and Jon, this convenience shortcut is not clearly justified and it could let the user thing the disabled EXPLAINs are related to the model instance rather than being globally disabled. --- railties/guides/source/active_record_querying.textile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'railties/guides') diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile index 742aefc32f..0cbabd71a1 100644 --- a/railties/guides/source/active_record_querying.textile +++ b/railties/guides/source/active_record_querying.textile @@ -1391,11 +1391,10 @@ production modes. h5. Disabling Automatic EXPLAIN -Automatic EXPLAIN can be selectively silenced with +silence_auto_explain+, which -is a class and instance method of +ActiveRecord::Base+: +Automatic EXPLAIN can be selectively silenced with +ActiveRecord::Base.silence_auto_explain+: -silence_auto_explain do +ActiveRecord::Base.silence_auto_explain do # no automatic EXPLAIN is triggered here end -- cgit v1.2.3