Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove entirely the params parameter to link_to_canvas?

This drops the call to @request.request_parameters that cause the last
three releases of facebooker.
  • Loading branch information...
commit 6f004a56fd5729a3c6d7209235bf0950bed809cf 1 parent a150ef6
@Flameeyes Flameeyes authored mmangino committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/facebooker/rails/facebook_url_rewriting.rb
View
4 lib/facebooker/rails/facebook_url_rewriting.rb
@@ -31,7 +31,7 @@ def link_to_new_canvas?
one_or_true @request.parameters["fb_sig_in_new_facebook"]
end
- def link_to_canvas?(params, options)
+ def link_to_canvas?(options)
option_override = options[:canvas]
return false if option_override == false # important to check for false. nil should use default behavior
option_override || (can_safely_access_request_parameters? && (one_or_true(@request.parameters["fb_sig_in_canvas"]) || one_or_true(@request.parameters[:fb_sig_in_canvas]) || one_or_true(@request.parameters["fb_sig_is_ajax"]) ))
@@ -44,7 +44,7 @@ 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 = link_to_canvas?(@request.request_parameters, options)
+ is_link_to_canvas = link_to_canvas?(options)
if is_link_to_canvas && !options.has_key?(:host)
options[:host] = Facebooker.canvas_server_base
end
Please sign in to comment.
Something went wrong with that request. Please try again.