diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb index 7fd0def..e78aa11 100644 --- a/app/helpers/layout_helper.rb +++ b/app/helpers/layout_helper.rb @@ -28,7 +28,7 @@ module LayoutHelper end def noosfero_javascript - plugins_javascripts = @plugins.flat_map{ |plugin| plugin.js_files.map{ |js| plugin.class.public_path(js, true) } }.flatten + plugins_javascripts = @plugins.flat_map{ |plugin| Array.wrap(plugin.js_files).map{ |js| plugin.class.public_path(js, true) } }.flatten output = '' output += render 'layouts/javascript' diff --git a/test/unit/layout_helper_test.rb b/test/unit/layout_helper_test.rb index 3e38946..6286c1d 100644 --- a/test/unit/layout_helper_test.rb +++ b/test/unit/layout_helper_test.rb @@ -30,4 +30,17 @@ class LayoutHelperTest < ActionView::TestCase assert_match /