app/helpers/rjs_helper.rb in rjs_helpers-0.0.2 vs app/helpers/rjs_helper.rb in rjs_helpers-0.0.3

- old
+ new

@@ -124,10 +124,14 @@ js_args = [] js_args << elem if elem js_args << rendered_content(content) if content js_args += args - %{rjsHelpers.#{js_function}(#{string_args(js_args)});} + if defined?(ActiveSupport::SafeBuffer) + %{rjsHelpers.#{js_function}(#{string_args(js_args)});}.html_safe + else + %{rjsHelpers.#{js_function}(#{string_args(js_args)});} + end end def string_args(args) args.map {|a| a.is_a?(Numeric) ? a : "'#{a}'"}.join(', ') end