From 33b044bc03f2654e872eaa27c0e53a1eeac7a0cb Mon Sep 17 00:00:00 2001 From: Mike Mangino Date: Fri, 20 Aug 2010 10:36:09 -0400 Subject: [PATCH] Add html_safe handling for rails3 --- lib/facebooker2/rails/controller.rb | 1 - lib/facebooker2/rails/helpers/javascript.rb | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/facebooker2/rails/controller.rb b/lib/facebooker2/rails/controller.rb index 1761fdd..e69dc08 100644 --- a/lib/facebooker2/rails/controller.rb +++ b/lib/facebooker2/rails/controller.rb @@ -1,6 +1,5 @@ require "digest/md5" require "hmac-sha2" -require "ruby-debug" module Facebooker2 module Rails module Controller diff --git a/lib/facebooker2/rails/helpers/javascript.rb b/lib/facebooker2/rails/helpers/javascript.rb index 8caaeaa..c623c40 100644 --- a/lib/facebooker2/rails/helpers/javascript.rb +++ b/lib/facebooker2/rails/helpers/javascript.rb @@ -2,6 +2,15 @@ module Facebooker2 module Rails module Helpers module Javascript + + def fb_html_safe(str) + if str.respond_to?(:html_safe) + str.html_safe + else + str + end + end + def fb_connect_async_js(app_id=Facebooker2.app_id,options={},&proc) opts = Hash.new(true).merge!(options) cookie = opts[:cookie]