Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Ruby
JavaScript

Cannot retrieve the latest commit at this time.
Failed to load latest commit information. | |||
![]() |
lib | ||
![]() |
testrailsapp | ||
![]() |
.gitignore | ||
![]() |
README | ||
![]() |
TODO.txt |
README
This Rack middleware (rack-uri-loader.rb) is intended to serve an external Web resource as though it were local, allowing further transmogrification. If you set your rails app to serve a view as text rather than as html, render :text => "http://www.yahoo.com", :content_type => "text/plain" then this middleware assumes you are giving it a URL. The middleware fetches the URL and serves up the resource in that view of your application. (techiferous's rack-plastic, http://github.com/techiferous/rack-plastic, is a complementary middleware which you could use to facilitate further Nokogiri manipulation of the page to be rendered. It was part of the inspiration for this middleware.)