Forum: Ruby on Rails Re: I think options_for_select is backwards

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
CSN (Guest)
on 2006-01-14 10:24
(Received via mailing list)
--- CSN <removed_email_address@domain.invalid> wrote:

> BTW, is there a simple way to swap a hash's keys and
> values (keys become values and vice versa). Probably
> with .each ?

Ah, .invert does the trick!

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
This topic is locked and can not be replied to.