myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2588] trunk/app/controllers/application.rb: made


From: noreply
Subject: [myexperiment-hackers] [2588] trunk/app/controllers/application.rb: made SQL columns unambiguous for sorting
Date: Fri, 15 Apr 2011 06:27:04 -0400 (EDT)

Revision
2588
Author
dgc
Date
2011-04-15 06:27:03 -0400 (Fri, 15 Apr 2011)

Log Message

made SQL columns unambiguous for sorting

Modified Paths

Diff

Modified: trunk/app/controllers/application.rb (2587 => 2588)


--- trunk/app/controllers/application.rb	2011-04-14 15:39:11 UTC (rev 2587)
+++ trunk/app/controllers/application.rb	2011-04-15 10:27:03 UTC (rev 2588)
@@ -394,57 +394,57 @@
         {
           :option => 'rank',
           :label  => 'Rank',
-          :order  => 'rank DESC'
+          :order  => 'contributions.rank DESC'
         },
         
         {
           :option => 'title',
           :label  => 'Title',
-          :order  => 'label, rank DESC'
+          :order  => 'contributions.label, contributions.rank DESC'
         },
 
         {
           :option => 'latest',
           :label  => 'Latest',
-          :order  => 'created_at DESC, rank DESC'
+          :order  => 'contributions.created_at DESC, contributions.rank DESC'
         },
 
         {
           :option => 'last_updated',
           :label  => 'Last updated',
-          :order  => 'updated_at DESC, rank DESC'
+          :order  => 'contributions.updated_at DESC, contributions.rank DESC'
         },
 
         {
           :option => 'rating',
           :label  => 'Community rating',
-          :order  => 'rating DESC, rank DESC'
+          :order  => 'contributions.rating DESC, contributions.rank DESC'
         },
 
         {
           :option => 'viewings',
           :label  => 'Most viewed',
-          :order  => 'site_viewings_count DESC, rank DESC'
+          :order  => 'contributions.site_viewings_count DESC, contributions.rank DESC'
         },
 
         {
           :option => 'downloads',
           :label  => 'Most downloaded',
-          :order  => 'site_downloads_count DESC, rank DESC'
+          :order  => 'contributions.site_downloads_count DESC, contributions.rank DESC'
         },
 
         {
           :option => 'type',
           :label  => 'Type',
           :joins  => [ :content_types ],
-          :order  => 'content_types.title, rank DESC'
+          :order  => 'content_types.title, contributions.rank DESC'
         },
 
         {
           :option => 'licence',
           :label  => 'Licence',
           :joins  => [ :licences ],
-          :order  => 'licenses.title, rank DESC'
+          :order  => 'licenses.title, contributions.rank DESC'
         }
       ],
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]