This project is archived and is in readonly mode.

#890 ✓stale
nosilume

in options_from_collection_for_select: text/value_method are chainable

Reported by nosilume | August 23rd, 2008 @ 11:57 PM | in 2.x


options_from_collection_for_select(City.all, "id", ["name", "humanize"])

I need this behaviour in my application, since the name fields are downcased and could contain _ too, I wanted to call "humanize" before outputting them. Of course you can chain as many methods as you want together.

I wrote a patch (my first patch, I hope I've done it right) to support this, I hope some of you find this useful. I also hope you understand my English.

Comments and changes to this ticket

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>

People watching this ticket

Attachments

Pages