afeld / jeditable-rails

a gem to add in-place-editable fields to your Rails project
MIT License
34 stars 18 forks source link

Select field ordering #1

Open afeld opened 13 years ago

afeld commented 13 years ago

There should be a way to specify the ordering of select options passed in as a hash, either through :data or another param. Perhaps accepting two-dimensional array to :data instead?

editable_field @user, :zip_code, :data => [['visa', 'Visa'], ['mastercard', 'Mastercard'], ['amex', 'American Express']]
tranquiliste commented 12 years ago

Agree, Option are sorted by the key, not in the order you provide the data. Any idea on what to modify to make the order in the data the order in the select?