[Rails] Re: Order Values in a Select Box Using select

2008-10-16 Thread mikej
Splendid, thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAI

[Rails] Re: Order Values in a Select Box Using select

2008-10-16 Thread Daniel Bush
mikej wrote: > Been trawling for a while and know there must be an easy answer to > this so reluctant to work round it. > > My select box: > > <%= form.select( :data, { "Yes" => "1", "No" => "0"},{:prompt => "� > Select �"}) %> > > The problem is the data is ordered alphabetically so the drop d

[Rails] Re: Order Values in a Select Box Using select

2008-10-16 Thread tejo
<%= f.select( :data, { "Yes" => "1", "No" => "0"}.sort.reverse, {:prompt => "– Select –"}) %> On Oct 16, 11:37 am, mikej <[EMAIL PROTECTED]> wrote: > Been trawling for a while and know there must be an easy answer to > this so reluctant to work round it. > > My select box: > > <%= form.selec