Automatic rubocop cleanups

This commit is contained in:
Christoph Haas 2025-02-03 01:08:08 +01:00
parent 890906929f
commit 2ec80b4bde
3 changed files with 96 additions and 97 deletions

View file

@ -1,10 +1,12 @@
# This controller creates the main page and the about page.
class WelcomeController < ApplicationController
# Render the main page.
def home
@newest_upload = Screenshot.where(approved: true).first
@most_popular_package = Package.with_screenshots.order(visits: :desc).first
@package_count = Package.count
@package_count = Package.count
# Get up 100 screenshots where the packages have the most visits
query = Package.without_screenshots.order(visits: :desc)
@ -13,6 +15,7 @@ class WelcomeController < ApplicationController
@most_wanted_package = query.offset(random_offset).first
end
# Render the about page.
def about
@package_sources = Rails.configuration.package_sources
@package_count = Package.count