This project is archived and is in readonly mode.
Delete() for OrderedHash to work like a Hash (not Array)
Reported by Sean Ouimet | May 5th, 2008 @ 11:31 AM
When using delete() on an OrderedHash a user would expect the command to work more like a Hash versus an Array. The deleted key should return the 'hash' value.
posts = posts.group_by(:&user_id)
#expected
users_posts = posts.delete(@current_user.id)
#current method to get Hash-like value returned
users_posts = posts.delete([@current_user.id, posts[@current_user.id]]).last
This patch adds a custom delete method to OrderedHash.
Comments and changes to this ticket
-
Repository May 5th, 2008 @ 04:04 PM
- State changed from new to resolved
(from [d75525b045b9f27ed108912a6dbdbad5ab775045]) Added OrderedHash#delete [#113 state:resolved]
Signed-off-by: Joshua Peek
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>