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