Hi,
I want to sort a array objects which depends upon relationships between
two tables.
table 1 : comments
table 2 : comments_date
Once a comment is added, the date which it is created will be saved in
comments date table.. now i want to sort the
comments array with respect to date it is created..
the code looks like this..
@comments.sort_by do |a|
a.comments_date
end
thanks in advance
--
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.