now with html_safe
Oleg
committed Jan 28, 2011
commit dd37ab3ea5165c723a67b14d9910c7346810962b
Showing 3
changed files with
3 additions
and 3 deletions
comfortable_mexican_sofa/view_hooks.rb b/lib/comfortable_mexican_sofa/view_hooks.rb
+1
-1
| @@ | @@ -11,7 +11,7 @@ module ComfortableMexicanSofa::ViewHooks |
| (self.hooks[name.to_sym] || []).each do |path| | |
| out += template.render({:partial => path}.merge(options)) | |
| end | |
| - | return out |
| + | return out.html_safe |
| end | |
| # Will declare a partial that will be rendered for this hook | |
test/fixtures/views/_nav_hook_2.html.erb
+1
-1
| @@ | @@ -1 +1 @@ |
| - | hook_content_2 |
| \ No newline at end of file | |
| + | <hook_content_2> |
| \ No newline at end of file | |
test/integration/view_hooks_test.rb
+1
-1
| @@ | @@ -19,7 +19,7 @@ class ViewHooksTest < ActionDispatch::IntegrationTest |
| http_auth :get, cms_admin_sites_path | |
| assert_response :success | |
| assert_match /hook_content/, response.body | |
| - | assert_match /hook_content_2/, response.body |
| + | assert_match /<hook_content_2>/, response.body |
| end | |
| def test_hooks_rendering_with_no_hook | |