mirror of
https://github.com/neocities/neocities.git
synced 2025-08-02 07:41:52 +02:00
sort by least views
This commit is contained in:
parent
9bd9d7cc3a
commit
766bc7a4a8
2 changed files with 6 additions and 2 deletions
|
@ -78,9 +78,12 @@ def browse_sites_dataset
|
|||
when 'hits'
|
||||
ds = ds.where{views > Site::BROWSE_MINIMUM_VIEWS}
|
||||
ds = ds.order(:hits.desc, :site_updated_at.desc)
|
||||
when 'views'
|
||||
when 'most_views'
|
||||
ds = ds.where{views > Site::BROWSE_MINIMUM_VIEWS}
|
||||
ds = ds.order(:views.desc, :site_updated_at.desc)
|
||||
when 'least_views'
|
||||
ds = ds.where{views > Site::BROWSE_MINIMUM_VIEWS}
|
||||
ds = ds.order(:views.asc, :site_updated_at.desc)
|
||||
when 'newest'
|
||||
ds = ds.order(:created_at.desc, :views.desc)
|
||||
when 'oldest'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue