Permalink
Browse files

Merge pull request #9532 from neerajdotname/fix-sql-in-example

In example fix sql that is generated from scoping
  • Loading branch information...
2 parents 9ee6f3c + 1173138 commit d3fa0259696ff20b77f9a2dfd206c9ab8627a669 @carlosantoniodasilva carlosantoniodasilva committed Mar 4, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 activerecord/lib/active_record/relation.rb
@@ -236,8 +236,9 @@ def many?
# Scope all queries to the current scope.
#
# Comment.where(post_id: 1).scoping do
- # Comment.first # SELECT * FROM comments WHERE post_id = 1
+ # Comment.first
# end
+ # # => SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = 1 ORDER BY "comments"."id" ASC LIMIT 1
#
# Please check unscoped if you want to remove all previous scopes (including
# the default_scope) during the execution of a block.

0 comments on commit d3fa025

Please sign in to comment.