Created
December 9, 2009 11:24
-
-
Save hannestyden/252414 to your computer and use it in GitHub Desktop.
Suggestion for ActiveSupport::CoreExtensions::Array::Conversions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActiveSupport::CoreExtensions::Array::Conversions | |
def to_ordered_hash | |
self.inject(ActiveSupport::OrderedHash.new) do |ordered_hash, (key, value)| | |
ordered_hash[key] = value | |
ordered_hash | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment