Created
December 1, 2009 04:27
-
-
Save becsegal/246054 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Override link_to to link to the facebook app address and | |
| # set target=_top when in a facebook iframe, using Facebooker | |
| def link_to(name, options = {}, html_options = {}) | |
| if params[:fb_sig_in_iframe] | |
| rel = url_for options | |
| url = "http://apps.facebook.com/" + FACEBOOKER['canvas_page_name'] + rel | |
| html_options[:href] = url | |
| html_options[:target] = "_top" | |
| super(name, {}, html_options) | |
| else | |
| super(name, options, html_options) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment