19 lines
553 B
Ruby
19 lines
553 B
Ruby
class WelcomeController < ApplicationController
|
|
def home
|
|
# 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
|
|
|
|
@package_count = Package.count
|
|
|
|
@most_wanted_package = Package.without_screenshots_most_visits.first
|
|
end
|
|
|
|
def about
|
|
@package_sources = Rails.configuration.package_sources
|
|
@package_count = Package.count
|
|
@screenshot_count = Screenshot.count
|
|
end
|
|
end
|