Commit b6e919f727daca93799d839fcbc4915800a4956b
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'track_order' into stable
* track_order: community_track: set default order to 'hits'
Showing
1 changed file
with
1 additions
and
3 deletions
Show diff stats
plugins/community_track/lib/community_track_plugin/track_list_block.rb
| ... | ... | @@ -30,14 +30,12 @@ class CommunityTrackPlugin::TrackListBlock < Block |
| 30 | 30 | def tracks(page=1, per_page=limit) |
| 31 | 31 | tracks = all_tracks |
| 32 | 32 | tracks = case order |
| 33 | - when 'hits' | |
| 34 | - tracks.order('hits DESC') | |
| 35 | 33 | when 'newer' |
| 36 | 34 | tracks.order('created_at DESC') |
| 37 | 35 | when 'random' |
| 38 | 36 | tracks.order('random()') |
| 39 | 37 | else |
| 40 | - tracks | |
| 38 | + tracks.order('hits DESC') | |
| 41 | 39 | end |
| 42 | 40 | tracks.paginate(:per_page => per_page, :page => page) |
| 43 | 41 | end | ... | ... |