From faabe06c39a36866821cf12aa1182a37cc0273d6 Mon Sep 17 00:00:00 2001 From: Reiner Dieterich Date: Tue, 17 Aug 2010 12:50:52 +0200 Subject: [PATCH] make fb_connect_async_js return a html_safe string for rails 3 --- lib/facebooker2/rails/helpers/javascript.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/facebooker2/rails/helpers/javascript.rb b/lib/facebooker2/rails/helpers/javascript.rb index dc6e489..1847286 100644 --- a/lib/facebooker2/rails/helpers/javascript.rb +++ b/lib/facebooker2/rails/helpers/javascript.rb @@ -31,8 +31,12 @@ module Facebooker2 s.appendChild(e); }()); - JAVASCRIPT - block_given? ? concat(js) : js + JAVASCRIPT + if ::Rails::VERSION::STRING > "2" + js.html_safe + else + block_given? ? concat(js) : js + end end end end