Commit b95442c7e0b09959639dc28fbec273abaf0bf919
1 parent
645a7610
Exists in
master
and in
29 other branches
Discard view_paths added by Noosfero's plugins
(ActionItem2244)
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -1154,7 +1154,7 @@ module ApplicationHelper |
1154 | 1154 | def render_environment_features(folder) |
1155 | 1155 | result = '' |
1156 | 1156 | environment.enabled_features.keys.each do |feature| |
1157 | - file = File.join(@controller.view_paths, 'shared', folder.to_s, "#{feature}.rhtml") | |
1157 | + file = File.join(@controller.view_paths.last, 'shared', folder.to_s, "#{feature}.rhtml") | |
1158 | 1158 | if File.exists?(file) |
1159 | 1159 | result << render(:file => file, :use_full_path => false) |
1160 | 1160 | end | ... | ... |
test/unit/application_helper_test.rb
... | ... | @@ -603,7 +603,7 @@ class ApplicationHelperTest < Test::Unit::TestCase |
603 | 603 | |
604 | 604 | @controller = ApplicationController.new |
605 | 605 | path = File.join(RAILS_ROOT, 'app', 'views') |
606 | - @controller.stubs(:view_paths).returns(path) | |
606 | + @controller.stubs(:view_paths).returns([path]) | |
607 | 607 | |
608 | 608 | file = path + '/shared/usermenu/xmpp_chat.rhtml' |
609 | 609 | expects(:render).with(:file => file, :use_full_path => false).returns('Open chat') | ... | ... |