diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index c54f3a9d..ed6c6c98 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -36,7 +36,7 @@ class MainController < ApplicationController .order('id DESC') .limit(300) .shuffle - .first(3) + .first(8) # Increased from 3 to 8 for the ticker @most_recent_threads = Thredded::Topic.where(id: most_recent_posts.pluck(:postable_id)) .where(moderation_state: "approved") .includes(:posts, :messageboard) diff --git a/app/views/main/dashboard.html.erb b/app/views/main/dashboard.html.erb index 8d4103f5..f4fbf6e3 100644 --- a/app/views/main/dashboard.html.erb +++ b/app/views/main/dashboard.html.erb @@ -545,6 +545,50 @@ <% end %> + + <% if @most_recent_threads && @most_recent_threads.any? %> +