Skip to content

Instantly share code, notes, and snippets.

@ordinaryzelig
Created January 21, 2013 14:16
Show Gist options
  • Save ordinaryzelig/4586363 to your computer and use it in GitHub Desktop.
Save ordinaryzelig/4586363 to your computer and use it in GitHub Desktop.
after moving things to middleware
send(route.fetch(:http_method).downcase, url) {
if (handler)
respond_with_json_protocol do |protocol|
handler.add_to_response(params, protocol)
end
else
erb route.fetch(:name)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment