Permalink
Browse files

Fix named scope + class method example

Closes #8804 [ci skip]
  • Loading branch information...
1 parent efbb041 commit 8242345c43ca89e2430a0278ce863b2733ae6261 @carlosantoniodasilva carlosantoniodasilva committed Jan 7, 2013
Showing with 1 addition and 3 deletions.
  1. +1 −3 activerecord/lib/active_record/scoping/named.rb
@@ -134,16 +134,14 @@ def scope_attributes? # :nodoc:
# end
#
# def self.titles
- # map(&:title)
+ # pluck(:title)
# end
- #
# end
#
# We are able to call the methods like this:
#
# Article.published.featured.latest_article
# Article.featured.titles
-
def scope(name, body, &block)
extension = Module.new(&block) if block

0 comments on commit 8242345

Please sign in to comment.