Permalink
Browse files

Fix for older versions of rails

  • Loading branch information...
1 parent af2aece commit f134d12d899c5f4f092327a7f5178dd1becbb615 @mmangino mmangino committed Jun 23, 2010
Showing with 6 additions and 2 deletions.
  1. +5 −1 lib/facebooker/rails/facebook_url_rewriting.rb
  2. +1 −1 lib/facebooker/version.rb
View
6 lib/facebooker/rails/facebook_url_rewriting.rb
@@ -44,7 +44,11 @@ def can_safely_access_request_parameters?
def rewrite_url_with_facebooker(*args)
options = args.first.is_a?(Hash) ? args.first : args.last
- is_link_to_canvas = @request.env["REQUEST_METHOD"] == "POST" && link_to_canvas?(@request.request_parameters, options)
+ if Rails.version >= '2.3.8'
+ is_link_to_canvas = @request.env["REQUEST_METHOD"] == "POST" && link_to_canvas?(@request.request_parameters, options)
+ else
+ is_link_to_canvas = link_to_canvas?(@request.request_parameters, options)
+ end
if is_link_to_canvas && !options.has_key?(:host)
options[:host] = Facebooker.canvas_server_base
end
View
2 lib/facebooker/version.rb
@@ -2,7 +2,7 @@ module Facebooker #:nodoc:
module VERSION #:nodoc:
MAJOR = 1
MINOR = 0
- TINY = 71
+ TINY = 72
STRING = [MAJOR, MINOR, TINY].join('.')
end

0 comments on commit f134d12

Please sign in to comment.