Forum: Ruby on Rails Ordering Based on created_at in HABTM relationship

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
John K. (Guest)
on 2006-06-11 01:11
(Received via mailing list)
I have the following line in my controller:

@tag = Tag.find_by_name @params[:id]

Now, how do I order the rows based on the HABTM relationship
problems_tags i.e. problems_tags.created_at DESC

Thanks :-)

John K.
http://www.kopanas.com


============================================================
http://www.soen.info - Index of online software engineering knowledge
http://www.cusec.net - Canadian University Software Engineering
Conference
http://www.soenlive.com - Presentations from CUSEC
This topic is locked and can not be replied to.