mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Viewing some tag routes wasn't rendering the list without JS (#12344)
This commit is contained in:
parent
11e6e9cca2
commit
52859bdeab
@ -7,16 +7,20 @@ class TagsController < ::ApplicationController
|
||||
before_action :ensure_tags_enabled
|
||||
before_action :ensure_visible, only: [:show, :info]
|
||||
|
||||
def self.show_methods
|
||||
Discourse.anonymous_filters.map { |f| :"show_#{f}" }
|
||||
end
|
||||
|
||||
requires_login except: [
|
||||
:index,
|
||||
:show,
|
||||
:tag_feed,
|
||||
:search,
|
||||
:info,
|
||||
Discourse.anonymous_filters.map { |f| :"show_#{f}" }
|
||||
].flatten
|
||||
*show_methods
|
||||
]
|
||||
|
||||
skip_before_action :check_xhr, only: [:tag_feed, :show, :index]
|
||||
skip_before_action :check_xhr, only: [:tag_feed, :show, :index, *show_methods]
|
||||
|
||||
before_action :set_category, except: [:index, :update, :destroy,
|
||||
:tag_feed, :search, :notifications, :update_notifications, :personal_messages, :info]
|
||||
|
@ -554,6 +554,12 @@ describe TagsController do
|
||||
expect(response.status).to eq(200)
|
||||
end
|
||||
|
||||
it "can render a topic list from the latest endpoint" do
|
||||
get "/tag/#{tag.name}/l/latest"
|
||||
expect(response.status).to eq(200)
|
||||
expect(response.body).to include("topic-list")
|
||||
end
|
||||
|
||||
it "can filter by two tags" do
|
||||
single_tag_topic; multi_tag_topic; all_tag_topic
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user