Assuming that you're trying to order them by the id, you can sort the
array when you pass it into .find.

Test.find( array_name.sort )

Good luck!

Cheers,
Robby

On Mon, Sep 22, 2008 at 10:19 PM, Dan Manges <[EMAIL PROTECTED]> wrote:
>
> You'll need to use the :order option.
>  Test.find([1,2,3,4,5], :order => "id")
>
> -Dan Manges
> http://www.dcmanges.com/blog
>
> On Sep 22, 4:24 pm, wheels <[EMAIL PROTECTED]> wrote:
>> How can i make ActiveRecord find in order for an array parameter?
>>
>> Ex. for Test.find([1, 2, 3, 4, 5])
>> it should return test.id=1 as the first entry.
>>
>> Right, it just returns in a random order.
>>
>> thanks
> >
>



-- 
Robby Russell
Chief Evangelist, Partner

PLANET ARGON, LLC
design // development // hosting

http://www.planetargon.com/
http://www.robbyonrails.com/
aim: planetargon

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to