Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

request self using request as reference

  • Loading branch information...
commit ca6a5711aceb36373fec7d624f0ddedbdd2b22df 1 parent 0ea6d86
@taf2 taf2 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/controllers/widgets_controller.rb
View
4 app/controllers/widgets_controller.rb
@@ -6,7 +6,7 @@ def index
def http
# going meta, query yourself, on the same thin server!
- http = EM::HttpRequest.new("http://localhost:3000/widgets").get
+ http = EM::HttpRequest.new("http://#{request.host}:#{request.port}/widgets").get
render :text => http.response
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.