Skip to content

Instantly share code, notes, and snippets.

@agibralter
Created June 8, 2010 23:41
Show Gist options
  • Save agibralter/430807 to your computer and use it in GitHub Desktop.
Save agibralter/430807 to your computer and use it in GitHub Desktop.
a hack so facebooker doesn't cause cucumber steps to explode if using rack 1.1.0
ActionController::Integration::Session.class_eval do
def generic_url_rewriter
env = {
'REQUEST_METHOD' => "GET",
'QUERY_STRING' => "",
"REQUEST_URI" => "/",
"HTTP_HOST" => host,
"SERVER_PORT" => https? ? "443" : "80",
"HTTPS" => https? ? "on" : "off",
"rack.input" => "wtf"
}
ActionController::UrlRewriter.new(ActionController::Request.new(env), {})
end
end
@agibralter
Copy link
Author

image
lol glad it's still helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment