I just encountered a bug that caused the links in my partials to be generated as non-canvas routes when the partial was loaded via ajax.<br><br>This bug is due to facebooker url rewriting checking for fb_sig_in_canvas to determine if the application is running in or outside a canvas, and fb_sig_in_canvas is not sent for ajax requests.<br>

<br>My hacked together patch diff is below, sorry I didn&#39;t have a chance to write tests or closely verify that my changes won&#39;t break anything else.<br><br>a/vendor/plugins/facebooker/lib/facebooker/rails/facebook_url_rewriting.rb b/vendor/plugins/facebooker/lib/facebooker/rails/facebook_url_rewriting.rb<br>
index 00b1e1d..e81a316 100644<br>--- a/vendor/plugins/facebooker/lib/facebooker/rails/facebook_url_rewriting.rb<br>+++ b/vendor/plugins/facebooker/lib/facebooker/rails/facebook_url_rewriting.rb<br>@@ -11,7 +11,7 @@ module ::ActionController<br>
&nbsp;&nbsp;&nbsp;&nbsp; def link_to_canvas?(params, options)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option_override = options[:canvas]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false if option_override == false # important to check for false. nil should use default behavior<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option_override || @request.parameters[&quot;fb_sig_in_canvas&quot;] == &quot;1&quot; ||&nbsp; @request.parameters[:fb_sig_in_canvas] == &quot;1&quot; <br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option_override || (@request.parameters[&quot;fb_sig_in_canvas&quot;] == &quot;1&quot;) ||&nbsp; (@request.parameters[:fb_sig_in_canvas] == &quot;1&quot;) || (@request.parameters[:fb_sig_is_ajax]==&quot;1&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp; end<br>
&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; def rewrite_url_with_facebooker(*args)<br><br>