18 lines
547 B
Ruby
18 lines
547 B
Ruby
class WelcomeController < ApplicationController
|
|
def home
|
|
# TODO: Only approved screenshots!
|
|
@newest_upload = Screenshot.newest.accessible_by(current_ability, :view).first
|
|
|
|
@most_popular_package = Package.with_screenshots.order(visits: :desc).first
|
|
|
|
@package_count = Package.count
|
|
|
|
@most_wanted_package = Package.without_screenshots.order(visits: :desc).first
|
|
end
|
|
|
|
def about
|
|
@package_sources = Rails.configuration.package_sources
|
|
@package_count = Package.count
|
|
@screenshot_count = Screenshot.count
|
|
end
|
|
end
|