Cope with new installation without screenshots
This commit is contained in:
parent
ea3769501b
commit
0207cb194b
3 changed files with 12 additions and 13 deletions
|
|
@ -3,12 +3,11 @@ class WelcomeController < ApplicationController
|
|||
# TODO: Only approved screenshots!
|
||||
@newest_upload = Screenshot.newest_upload
|
||||
|
||||
# TODO: Use the actually most popular package and not just a random one
|
||||
@most_popular_package = Package.order(:visits).last
|
||||
@most_popular_package = Package.with_screenshots.order(visits: :desc).first
|
||||
|
||||
@package_count = Package.count
|
||||
|
||||
@most_wanted_package = Package.without_screenshots_most_visits.first
|
||||
@most_wanted_package = Package.without_screenshots.order(visits: :desc).first
|
||||
end
|
||||
|
||||
def about
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue