Skip to content

A platform for community discussion. Free, open, simple.

FIX: pass empty hash for view locals by default (#16879)

Arpit Jalane8e9754a3cc7
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a91abf702b0..233e123122b 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -449,10 +449,7 @@ module ApplicationHelper
@all_connectors = Dir.glob("plugins/*/app/views/connectors/**/*.html.erb")
end
- def server_plugin_outlet(name, locals: nil)
- # Don't evaluate plugins in test
- return "" if Rails.env.test?
-
+ def server_plugin_outlet(name, locals: {})
matcher = Regexp.new("/connectors/#{name}/.*\.html\.erb$")
erbs = ApplicationHelper.all_connectors.select { |c| c =~ matcher }
return "" if erbs.blank?