Skip to content

Instantly share code, notes, and snippets.

@cantremember
Created March 23, 2012 05:21
Show Gist options
  • Save cantremember/2167194 to your computer and use it in GitHub Desktop.
Save cantremember/2167194 to your computer and use it in GitHub Desktop.
Facebook Tunnel action for Rails
# 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