Created
March 23, 2012 05:21
-
-
Save cantremember/2167194 to your computer and use it in GitHub Desktop.
Facebook Tunnel action for Rails
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
# allows for Facebook pub / dev tunneling | |
# have to set the Cookie within the scope of the app | |
# can't use Firefox cookie editor to hack it | |
def tunnel | |
# how convenient! | |
value = params[:id] | |
# this is how we get pub / dev tunneling | |
# see support/nginx | |
if value == 'nil' | |
cookies.delete :_forgiveness_tunnel | |
else | |
cookies[:_forgiveness_tunnel] = value | |
end | |
###render :text => "OK #{value}", :content_type => 'text/plain' | |
redirect_to root_url | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment