Skip to content

Commit

Permalink
Merge pull request rails#44609 from djpowers/patch-1
Browse files Browse the repository at this point in the history
Update verbose_query_logs method [ci-skip]
  • Loading branch information
kamipo committed Mar 4, 2022
2 parents 74ba52e + 3c378c4 commit d8e17c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/debugging_rails_applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ irb(main):001:0> Article.pamplemousse
=> #<Comment id: 2, author: "1", body: "Well, actually...", article_id: 1, created_at: "2018-10-19 00:56:10", updated_at: "2018-10-19 00:56:10">
```

After running `ActiveRecord::Base.verbose_query_logs = true` in the `bin/rails console` session to enable verbose query logs and running the method again, it becomes obvious what single line of code is generating all these discrete database calls:
After running `ActiveRecord.verbose_query_logs = true` in the `bin/rails console` session to enable verbose query logs and running the method again, it becomes obvious what single line of code is generating all these discrete database calls:

```
irb(main):003:0> Article.pamplemousse
Expand Down

0 comments on commit d8e17c5

Please sign in to comment.