Showing newest and most wanted package on home page
This commit is contained in:
parent
dbca1e0a19
commit
9ad5a05914
3 changed files with 48 additions and 38 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue