search for: asset_location_id

Displaying 1 result from an estimated 1 matches for "asset_location_id".

2006 Jun 26
2
How can I sort options in a select box?
Pretty much a newbie here, looking for help on select boxes in forms.... Is there any way in the view to sort the options of a drop-down select box? My current code (within a larger _form.rhtml file) is: <div class="form-element"> <label for="asset_location_id">Location</label> <%= select ''asset'', ''location_id'', [["Select a Location", ""],["", ""]] + Location.find_all.collect { |l| [ l.name, l.id ] } %> </div> This starts the drop-down menu with a nu...