diff --git a/lib/facebooker2/rails/helpers/javascript.rb b/lib/facebooker2/rails/helpers/javascript.rb index 906a407..88f4822 100644 --- a/lib/facebooker2/rails/helpers/javascript.rb +++ b/lib/facebooker2/rails/helpers/javascript.rb @@ -2,6 +2,13 @@ module Facebooker2 module Rails module Helpers module Javascript + def fb_concat(str) + if ::Rails::VERSION::STRING.to_i > 2 + str + else + concat(str) + end + end def fb_html_safe(str) if str.respond_to?(:html_safe) @@ -16,6 +23,7 @@ module Facebooker2 cookie = opts[:cookie] status = opts[:status] xfbml = opts[:xfbml] + locale = options[:locale] || "en_US" extra_js = capture(&proc) if block_given? js = <<-JAVASCRIPT JAVASCRIPT - js + fb_html_safe(block_given? ? fb_concat(js) : js) end end end