Forum: Ruby on Rails Sorting in rails 2.3.5 not same as sorting in (Rails 3.2.8)

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.
C41f3661214c285f6d3197d6dd6c1d5a?d=identicon&s=25 rails3 champ (rails3champ)
on 2012-10-31 11:42
In rails 2.3.5 (with active scaffold) all my columns in display were
 sorted even though they belonged to a related table. But in Rails 3.2.8
 , only columns which belong to the main table are sorted .To sort a
 related table column we need to specifically add the line below

columns[:columnfromtable2].sort_by :sql => ['name']

I have many columns which are 'related' in many pages  , it would be
tedious to add this line in them all
C41f3661214c285f6d3197d6dd6c1d5a?d=identicon&s=25 rails3 champ (rails3champ)
on 2012-10-31 15:50
solved!!
This topic is locked and can not be replied to.