diff --git a/activerecord/lib/active_record/explain.rb b/activerecord/lib/active_record/explain.rb index ab3a45ae539b465576408ae191d4d27caf411c20..4d013f0ef431ebe6269543f17192b787065b3a89 100644 --- a/activerecord/lib/active_record/explain.rb +++ b/activerecord/lib/active_record/explain.rb @@ -1,5 +1,5 @@ module ActiveRecord - module Explain # :nodoc + module Explain # :nodoc: # logging_query_plan calls could appear nested in the call stack. In # particular this happens when a relation fetches its records, since # that results in find_by_sql calls downwards. @@ -31,7 +31,7 @@ def logging_query_plan(&block) # SCHEMA queries cannot be EXPLAINed, also we do not want to run EXPLAIN on # our own EXPLAINs now matter how loopingly beautiful that would be. - SKIP_EXPLAIN_FOR = %(SCHEMA EXPLAIN) + SKIP_EXPLAIN_FOR = %w(SCHEMA EXPLAIN) def ignore_explain_notification?(payload) payload[:exception] || SKIP_EXPLAIN_FOR.include?(payload[:name]) end diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index e69e1aeaf8942d433d3868de83887bcde7d5666b..1db26562b859cd68ac8333acec9f40e59a286a19 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -155,7 +155,7 @@ def respond_to?(method, include_private = false) # Please see further details in the # {Active Record Query Interface guide}[http://edgeguides.rubyonrails.org/active_record_querying.html#running-explain]. def explain - results, sqls, binds = collecting_sqls_for_explain { exec_query } + _, sqls, binds = collecting_sqls_for_explain { exec_query } exec_explain(sqls, binds) end diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index a324486d6ffe66dd201541f2a085cae526159d9a..64abff6cb3c7c153a9efaed1b03f7a1be848accd 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -5,7 +5,7 @@ configuration files. With a value of 0.5 in development.rb, and commented out in production.rb. No mention in test.rb. *fxn* -* Display mounted engine's routes in `rake routes`. *Piotr Sarnacki* +* Add DebugExceptions middleware which contains features extracted from ShowExceptions middleware *José Valim* * Display mounted engine's routes in `rake routes` *Piotr Sarnacki*