Skip to content
Browse files

request self using request as reference

  • Loading branch information...
1 parent 0ea6d86 commit ca6a5711aceb36373fec7d624f0ddedbdd2b22df @taf2 taf2 committed Oct 23, 2010
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

0 comments on commit ca6a571

Please sign in to comment.
Something went wrong with that request. Please try again.