hello, is there a reason why my attributes are not in the order as i declare them in my hash? two pasties to see what i mean. code: http://pastie.org/pastes/216649 result: http://pastie.org/pastes/216657 the :id and :value attributes are twisted. but i need them in this order on the client. any hints whats going in here? btw: app is still on 1.2.6. but just tested the same code on 2.1 with the same result. thank you --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 17 Jun 2008, at 22:19, dweinand wrote:> > hello, > > is there a reason why my attributes are not in the order as i declare > them in my hash? > two pasties to see what i mean. >hashes in ruby are not ordered (at least not in 1.8) Fred> code: > http://pastie.org/pastes/216649 > > result: > http://pastie.org/pastes/216657 > > the :id and :value attributes are twisted. but i need them in this > order on the client. > any hints whats going in here? > > btw: app is still on 1.2.6. but just tested the same code on 2.1 with > the same result. > > thank you > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
okay. makes sense to me. ok, i''ll have to find another way. thx for the information. On 17 Jun., 23:22, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 17 Jun 2008, at 22:19, dweinand wrote: > > > > > hello, > > > is there a reason why my attributes are not in the order as i declare > > them in my hash? > > two pasties to see what i mean. > > hashes in ruby are not ordered (at least not in 1.8) > > Fred > > > code: > >http://pastie.org/pastes/216649 > > > result: > >http://pastie.org/pastes/216657 > > > the :id and :value attributes are twisted. but i need them in this > > order on the client. > > any hints whats going in here? > > > btw: app is still on 1.2.6. but just tested the same code on 2.1 with > > the same result. > > > thank you--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---