> Wild guess, but perhaps you''re not doing a case-insensitive sort? 
In
> which case you''ll get A through Z, then a through z again.
> 
> Jeff
> 
> REST with Rails
> Oct 4, 2008, Austin Tx
> http://www.purpleworkshops.com/workshops/rest-and-web-services
No, everything is saved in all uppercase. Here is how I get my list:
 @users = User.find( :all, :conditions => [''approved = ?'',
true],
    :order => ''company ASC, username ASC'')
All users are save with a comapnt field specifying who they work for and 
this field is also saved in all uppercase. In my view I loop through and 
pull out all the users working for a particular company. Everything 
thing get printed correctly - companies are found and all their users 
are displayed underneath their heading. However, I one company in 
particular, there are a lot of profiles and for this company is where I 
find this phenomenon. Here is how I loop through the profiles:
      <% company_name = "" %>
      <div>
  <table>
    <% @users.each do |x|
      if x.primary_account_id != company_name
      company_name = x.primary_account_id %>
    <tr>
      <th><%= x.company %></th>
    </tr>
                <tr>
        <td>
          <%=link_to x.username, {:action =>
                        ''update_form'', :controller =>
''enroll'', :id =>
x.id,
                        :manager => x.role == "Travel Manager" ?
x.id :
'''',
                        :admin => @user.id}, :target => "_blank"
%>
        </td>
    </tr>
         ...........
         </table>
       </div>
-- 
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
-~----------~----~----~----~------~----~------~--~---