FIX: do not preload topic list for new topic/message routes ()

This commit fixes the issue where the sub-category topic list was not
loading for new-topic routes. Since we do not need to preload topic
lists for new topic/message routes this commit adds a no-op controller
that prevents topic lists pre loading and at the same time fixes the sub
category topics not loading issue.
This commit is contained in:
Arpit Jalan 2022-11-09 20:57:42 +05:30 committed by GitHub
parent 698c3ced15
commit 8b8c1291e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

@ -0,0 +1,5 @@
# frozen_string_literal: true
class NewTopicController < ApplicationController
def index; end
end

@ -838,8 +838,8 @@ Discourse::Application.routes.draw do
get 'embed/count' => 'embed#count'
get 'embed/info' => 'embed#info'
get "new-topic" => "list#latest"
get "new-message" => "list#latest"
get "new-topic" => "new_topic#index"
get "new-message" => "new_topic#index"
# Topic routes
get "t/id_for/:slug" => "topics#id_for_slug"