Add app/controllers/home_controller.rb

This commit is contained in:
agnes 2025-12-28 12:37:07 +00:00
parent d9a97f9e1a
commit 0d35eeeb28

View file

@ -0,0 +1,14 @@
# replace index at the bottom with this code
def index
@homepage = Homepage.new(@current_user)
@random_user = User.unscoped.order(Arel.sql("RAND()")).first
unless @homepage.logged_in?
@user_count, @work_count, @fandom_count = @homepage.rounded_counts
end
@hide_dashboard = true
render action: 'index', layout: 'application'
end
end