From a6cd35ba68c6d210f097a37ff737bbc1e5c61972 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Tue, 26 Jan 2010 11:59:19 -0500 Subject: moving html_safe call into helpers directly as they only work from that level --- actionpack/lib/action_view/helpers/ajax_helper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 8d09ca1187..5b706ba942 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -405,7 +405,7 @@ module ActionView # periodically_call_remote does not need data-observe=true attributes.delete('data-observe') - script_decorator(attributes) + script_decorator(attributes).html_safe! end # Observes the field with the DOM ID specified by +field_id+ and calls a @@ -484,7 +484,7 @@ module ActionView attributes = extract_observer_attributes!(options) attributes.merge!(html_options) if html_options - script_decorator(attributes) + script_decorator(attributes).html_safe! end # Observes the form with the DOM ID specified by +form_id+ and calls a @@ -499,13 +499,13 @@ module ActionView options[:observed] = name attributes = extract_observer_attributes!(options) - script_decorator(attributes) + script_decorator(attributes).html_safe! end def script_decorator(options) attributes = %w(type="application/json") attributes += options.map{|k, v| k + '="' + v.to_s + '"'} - "".html_safe! + "" end private -- cgit v1.2.3