From ba56b3447098890d313f943781b5413c566e14cd Mon Sep 17 00:00:00 2001 From: Michael Kozono Date: Tue, 19 Jun 2018 16:27:07 -0700 Subject: Fix documentation code blocks --- doc/development/query_recorder.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/development/query_recorder.md b/doc/development/query_recorder.md index 61e5e1afede..2167ed57428 100644 --- a/doc/development/query_recorder.md +++ b/doc/development/query_recorder.md @@ -28,6 +28,7 @@ By default, QueryRecorder will ignore cached queries in the count. However, it m all queries to avoid introducing an N+1 query that may be masked by the statement cache. To do this, pass the `skip_cached` variable to `QueryRecorder` and use the `exceed_all_query_limit` matcher: +``` it "avoids N+1 database queries" do control_count = ActiveRecord::QueryRecorder.new(skip_cached: false) { visit_some_page }.count create_list(:issue, 5) -- cgit v1.2.1