diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-07 21:22:43 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-07 21:24:53 -0200 |
commit | 8242345c43ca89e2430a0278ce863b2733ae6261 (patch) | |
tree | 97dd3944c6b3b02b7e4d064732e7e832b45d10bc | |
parent | efbb041fb0146d5f633c2e645217f3a734539f11 (diff) | |
download | rails-8242345c43ca89e2430a0278ce863b2733ae6261.tar.gz rails-8242345c43ca89e2430a0278ce863b2733ae6261.tar.bz2 rails-8242345c43ca89e2430a0278ce863b2733ae6261.zip |
Fix named scope + class method example
Closes #8804 [ci skip]
-rw-r--r-- | activerecord/lib/active_record/scoping/named.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/scoping/named.rb b/activerecord/lib/active_record/scoping/named.rb index 8b7eda6eee..01fbb96b8e 100644 --- a/activerecord/lib/active_record/scoping/named.rb +++ b/activerecord/lib/active_record/scoping/named.rb @@ -134,16 +134,14 @@ module ActiveRecord # 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 |