Commit 116a04c0470e591dd1047bf5047b2e1d26925ac3
1 parent
6d06bc15
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
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
... | ... | @@ -24,14 +24,12 @@ class CommunityTrackPlugin::TrackListBlock < Block |
24 | 24 | def tracks(page=1, per_page=limit) |
25 | 25 | tracks = all_tracks |
26 | 26 | tracks = case order |
27 | - when 'hits' | |
28 | - tracks.order('hits DESC') | |
29 | 27 | when 'newer' |
30 | 28 | tracks.order('created_at DESC') |
31 | 29 | when 'random' |
32 | 30 | tracks.order('random()') |
33 | 31 | else |
34 | - tracks | |
32 | + tracks.order('hits DESC') | |
35 | 33 | end |
36 | 34 | tracks.paginate(:per_page => per_page, :page => page) |
37 | 35 | end | ... | ... |