From cc450329b2c21928bece7544de4f95a4eebde03c Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Fri, 23 Dec 2011 09:53:21 +0530 Subject: [PATCH] [docs] pluck docs reverted for activesupport https://github.com/rails/rails/commit/367741ef22d1538b8550cf6e4b2276a0946066c0 --- .../source/active_support_core_extensions.textile | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index cf9185a3241b9..0b5290b72c65b 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -1977,16 +1977,6 @@ end NOTE: Defined in +active_support/core_ext/enumerable.rb+. -h4. +pluck+ - -The +pluck+ method collects the value of the passed method for each element and returns the result as an array. - - -people.pluck(:name) # => [ "David Heinemeier Hansson", "Jamie Heinemeier Hansson" ] - - -NOTE: Defined in +active_support/core_ext/enumerable.rb+. - h4. +each_with_object+ The +inject+ method offers iteration with an accumulator: