Showing newest and most wanted package on home page

This commit is contained in:
Christoph Haas 2016-08-23 19:00:39 +02:00
parent dbca1e0a19
commit 9ad5a05914
3 changed files with 48 additions and 38 deletions

View file

@ -1,12 +1,14 @@
class WelcomeController < ApplicationController
def home
# TODO: Use the package with the actual newest uploaded screenshot
@newest_uploaded_package = Package.with_screenshots.first
# 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.with_screenshots.first
@package_count = Package.count
@most_wanted = Package.without_screenshots_most_visits.first
end
def about