I had done it ..
using abcarray = Abc.find(:all, :conditions => { :id => 'whatever',
:name => "Hemant" }, :order => 'day' )
and then ..
abcarray.sort {|a,b| a.time <=> b.time}
I think this is the right way to do it .. ?
What say champs ..? :)
Phlip wrote:
> Hemant Bhargava wrote:
>> I am executing an sql query .. as like ..
>> abcarray = Abc.find(:all, :conditions => { :id => 'whatever', :name =>
>> "Hemant" },
>
> :order => 'date, time'
> )
>
>> abcarray records are in this format:-
>> id: 1, created_at: nil, updated_at: nil, day: 1, clinic_id: 13, time:
>> 530
--
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 [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
-~----------~----~----~----~------~----~------~--~---