mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 15:29:29 +08:00
DEV: Add test ENV conditional back to server_plugin_outlet (#16878)
Add test ENV conditional back to server_plugin_outlet
This commit is contained in:
parent
defa5a4e94
commit
4b63cd3848
|
@ -450,6 +450,9 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def server_plugin_outlet(name, locals: nil)
|
||||
# Don't evaluate plugins in test
|
||||
return "" if Rails.env.test?
|
||||
|
||||
matcher = Regexp.new("/connectors/#{name}/.*\.html\.erb$")
|
||||
erbs = ApplicationHelper.all_connectors.select { |c| c =~ matcher }
|
||||
return "" if erbs.blank?
|
||||
|
|
Loading…
Reference in New Issue
Block a user