Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Delete() for OrderedHash to work like a Hash (not Array)

#113

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.

Reported by Sean Ouimet · May 5th, 2008 @ 11:31 AM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Repository
    Repository
    • State changed from new to resolved

    (from [d75525b045b9f27ed108912a6dbdbad5ab775045]) Added OrderedHash#delete [#113 state:resolved]

    Signed-off-by: Joshua Peek

    http://github.com/rails/rails/co...

    May 5th, 2008 @ 04:04 PM