Martin Eisenhardt
2008-Jul-22 19:10 UTC
AW: [Rails] help creating array/struct for select tag
Hi Scott!> I am using some data that is not in a database so I generated a hash > like the following: > > @orders = {''Name => ''name'', ''Rank'' => ''rank'', ''HP'' => ''hp'', ''SP'' => > ''sp''} etc... > > it works fine but the problem I have is that the hash is never in the > same order...after reading it looks like i should be using a struct or > an array.AFAIK hashes are *not* ordered *by definition*. I know this may not be very helpful but it may explain *why* you experience this behaviour. Kind regards Martin --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Scott Kulik
2008-Jul-22 23:47 UTC
Re: AW: [Rails] help creating array/struct for select tag
maybe i should just create two more tables : ) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---