Try
a=[12,354,633,68,85].sort
or
<%for i in a.sort %>
--wpd
On Tue, Jul 15, 2008 at 5:31 AM, Pragash Mr.
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
> Hi,
>
> for example
>
>
> a=[12,354,633,68,85]
> <%for i in a%>
> <%z=Document.find(i)%>
> <%=z.name%>
> <%end%>
>
> Here the result is displaying randomly in browser
> but i want to display the result in the array order
> i.e first 12 then followed by 354,633,68,85
>
> If you have any solution pla reply
> --
> 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
-~----------~----~----~----~------~----~------~--~---