From 2890be2f5316ea117b2e19aee533ca11c2fa6079 Mon Sep 17 00:00:00 2001 From: nathanvda Date: Sat, 18 Jun 2011 01:32:38 +0200 Subject: [PATCH] Fixes #9. Make sure that the link_to_add_association also works in rails 3.0.8. by making sure the template-html is not double escaped. --- lib/cocoon/view_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cocoon/view_helpers.rb b/lib/cocoon/view_helpers.rb index 5ee55a8..29b96a1 100644 --- a/lib/cocoon/view_helpers.rb +++ b/lib/cocoon/view_helpers.rb @@ -62,7 +62,7 @@ module Cocoon html_options[:'data-associations'] = association.to_s.pluralize new_object = f.object.class.reflect_on_association(association).klass.new - html_options[:'data-template'] = CGI.escapeHTML(render_association(association, f, new_object)) + html_options[:'data-template'] = CGI.escapeHTML(render_association(association, f, new_object)).html_safe link_to(name, '#', html_options ) end