debshots/app/controllers/welcome_controller.rb

24 lines
573 B
Ruby

class WelcomeController < ApplicationController
def home
# TODO: Use the package with the actual newest uploaded screenshot
@newest_uploaded_package = Package.with_screenshots.first
# TODO: Use the actually most popular package and not just a random one
@most_popular_package = Package.with_screenshots.first
package_count
end
def about
@package_sources = Rails.configuration.package_sources
package_count
end
private
# TODO: show count depending on virtual host
def package_count
@package_count = Package.count
end
end