Hi Thomas
Hashes dont respect any order. You have to use an Array.
santiago.
On 9/3/05, Thomas Balthazar <tba-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
wrote:> Hi everybody,
>
> In my Controller, I''m doing this :
>
> def list
> @hash_column_titles = {
> ''firstname'' => "Name",
> ''email'' => "E-mail",
> ''role_id'' => "Role",
> ''status'' => "Status"
> }
> end
>
> When I''m in my View, and that I iterate through this Hash, I get
the
> values in the wrong order.
>
> @hash_column_titles.each { |column_name, column_label|
> ...
> }
>
> Am I doing something wrong?
>
> What can I do the have my Hash ordered in the same way it was declared?
>
> Thanks in advance for your help.
> Have a nice Sunday, all!
>
> Thomas Balthazar.
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>