debshots/app/controllers/welcome_controller.rb

19 lines
548 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.with_screenshots.first
@package_count = Package.count
@most_wanted = 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