From c0563cec6d87adafa99e3b86356c0e912e00030e Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 22 Dec 2011 12:21:29 -0700 Subject: Revert "Added Enumerable#pluck to wrap the common pattern of collect(&:method) *DHH*" This reverts commit 4d20de8a50d889a09e6f5642984775fe796ca943. --- activesupport/lib/active_support/core_ext/enumerable.rb | 7 ------- 1 file changed, 7 deletions(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/core_ext/enumerable.rb b/activesupport/lib/active_support/core_ext/enumerable.rb index d9856f2e84..9343bb7106 100644 --- a/activesupport/lib/active_support/core_ext/enumerable.rb +++ b/activesupport/lib/active_support/core_ext/enumerable.rb @@ -63,13 +63,6 @@ module Enumerable end end - # Plucks the value of the passed method for each element and returns the result as an array. Example: - # - # people.pluck(:name) # => [ "David Heinemeier Hansson", "Jamie Heinemeier Hansson" ] - def pluck(method) - collect { |element| element.send(method) } - end - # Iterates over a collection, passing the current element *and* the # +memo+ to the block. Handy for building up hashes or # reducing collections down to one object. Examples: -- cgit v1.2.3