Commit d6e22eff2bc833af0224342e510e457d66111f73
1 parent
9883b50d
Exists in
master
and in
29 other branches
rails3: fix public_path from plugins
Not sure if compute_public_path should be replaced by a simple File.join. Consider the use of asset_path if the current solution isn't safe.
Showing
2 changed files
with
6 additions
and
1 deletions
Show diff stats
lib/noosfero/plugin.rb
test/functional/application_controller_test.rb
... | ... | @@ -360,6 +360,9 @@ class ApplicationControllerTest < ActionController::TestCase |
360 | 360 | environment.enable_plugin(Plugin1.name) |
361 | 361 | environment.enable_plugin(Plugin2.name) |
362 | 362 | |
363 | + ActionView::Helpers::AssetTagHelper::StylesheetIncludeTag.any_instance.stubs('asset_file_path!') | |
364 | + ActionView::Helpers::AssetTagHelper::JavascriptIncludeTag.any_instance.stubs('asset_file_path!') | |
365 | + | |
363 | 366 | get :index |
364 | 367 | |
365 | 368 | assert_tag :tag => 'link', :attributes => {:href => /#{plugin1_path}/, :type => 'text/css', :rel => 'stylesheet'} |
... | ... | @@ -391,6 +394,8 @@ class ApplicationControllerTest < ActionController::TestCase |
391 | 394 | environment.enable_plugin(Plugin1.name) |
392 | 395 | environment.enable_plugin(Plugin2.name) |
393 | 396 | |
397 | + ActionView::Helpers::AssetTagHelper::JavascriptIncludeTag.any_instance.stubs('asset_file_path!') | |
398 | + | |
394 | 399 | get :index |
395 | 400 | |
396 | 401 | assert_tag :tag => 'script', :attributes => {:src => /#{plugin1_path}/, :type => 'text/javascript'} | ... | ... |