Permalink
Browse files

fix the sql that is generated from scoping

  • Loading branch information...
1 parent 5c13549 commit 11731385d4a712d654e1452011f8b10d004d9c6d Neeraj Singh committed Mar 3, 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 1173138

Please sign in to comment.