Find find company name and user name

I have this list of registered users which I find by a find statment in
my controller:

@users = User.find( :all, :conditions => ['approved = ?', true],
         :order => 'company ASC')

Then in my view I run through this array and get all the registered
users for each company and print them out in a nice, easy to read list.
I am order in ascending order by company, but I would also like to order
the users for each company in ascending order as well. I am not exactly
sure where to start with this. I think this might be a hashing issues
but I am not really sure. In line with that thinking, does the above
find save "stuff" in a hash or a strait forward array? Any suggestions?
Thanks,

-S

I have this list of registered users which I find by a find statment in
my controller:

@users = User.find( :all, :conditions => ['approved = ?', true],
        :order => 'company ASC')

Then in my view I run through this array and get all the registered
users for each company and print them out in a nice, easy to read list.
I am order in ascending order by company, but I would also like to order
the users for each company in ascending order as well. I am not exactly
sure where to start with this.

Is :order => 'company asc, name asc' what you mean

I think this might be a hashing issues
but I am not really sure. In line with that thinking, does the above
find save "stuff" in a hash or a strait forward array? Any suggestions?
Thanks,

It returns an array

Frederick Cheung wrote: