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:27:41 -0200 |
commit | 040ff5b472c5c90837c3913ce5bf144ad6bb3ac3 (patch) | |
tree | f461090eefbfa3336a4b7c76c6f8d9cea72d566e /activerecord/lib/active_record/scoping | |
parent | 831aad2ee992771df377188abbca015dfa24183b (diff) | |
download | rails-040ff5b472c5c90837c3913ce5bf144ad6bb3ac3.tar.gz rails-040ff5b472c5c90837c3913ce5bf144ad6bb3ac3.tar.bz2 rails-040ff5b472c5c90837c3913ce5bf144ad6bb3ac3.zip |
Fix named scope + class method example
Closes #8804 [ci skip]
Conflicts:
activerecord/lib/active_record/scoping/named.rb
Diffstat (limited to 'activerecord/lib/active_record/scoping')
-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 d6b0265fb3..767b30f51f 100644 --- a/activerecord/lib/active_record/scoping/named.rb +++ b/activerecord/lib/active_record/scoping/named.rb @@ -161,16 +161,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, scope_options = {}) name = name.to_sym valid_scope_name?(name) |