rails3 champ
2012-Oct-31 10:42 UTC
Sorting in rails 2.3.5 not same as sorting in (Rails 3.2.8)
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 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
rails3 champ
2012-Oct-31 14:50 UTC
Re: Sorting in rails 2.3.5 not same as sorting in (Rails 3.2.8)
solved!! -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.