Hemant Bhargava wrote:
> 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 ..? :)
Not only is it the wrong way (you should be using :order => 'date,
time'), but it's clear from your post that you didn't pay much attention
to the answer Phlip already gave you.
Hemant, I've noticed that you post a lot of beginner questions on this
list that could be answered by a quick look in the Rails docs, or at
least by a good book or the Rails Guides. May I suggest that you spend
a little less time posting to the list and a little more time reading
documentation?
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
--
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
-~----------~----~----~----~------~----~------~--~---