diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb new file mode 100644 index 0000000..aae6404 --- /dev/null +++ b/app/controllers/home_controller.rb @@ -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 +