This project is archived and is in readonly mode.

#1249 ✓committed
Codeape

[PATCH] New Feature - grouped_collection_select

Reported by Codeape | October 22nd, 2008 @ 02:38 PM | in 2.3.4

The disconnect between collection_select and option_groups_from_collection_for_select has been bugging me for some time, so I thought I'd quickly do something about it.

grouped_collection_select provides the same functionality as collection_select(object, method, collection), but uses the semantics and has the same output as option_groups_from_collection_for_select.

Example: grouped_collection_select(:destination, :country_id, @continents, :countries, :name, :id, :name)

It's not major, but I thought I'd quickly throw it in, hopefully someone finds it useful enough. Patch contains implementation, tests and doc, developed against Edge

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>

Referenced by

Pages