Add html_safe handling for rails3

This commit is contained in:
Mike Mangino 2010-08-20 10:36:09 -04:00
parent c7f52f2f8a
commit 33b044bc03
2 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,5 @@
require "digest/md5" require "digest/md5"
require "hmac-sha2" require "hmac-sha2"
require "ruby-debug"
module Facebooker2 module Facebooker2
module Rails module Rails
module Controller module Controller

View File

@ -2,6 +2,15 @@ module Facebooker2
module Rails module Rails
module Helpers module Helpers
module Javascript 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) def fb_connect_async_js(app_id=Facebooker2.app_id,options={},&proc)
opts = Hash.new(true).merge!(options) opts = Hash.new(true).merge!(options)
cookie = opts[:cookie] cookie = opts[:cookie]