Module: ResponseAssembler
- Defined in:
- lib/response_assembler/middleware.rb
Overview
This class is piece of Rack middleware that filters responses from your app and finds <get>/some/relative/url</get> or <xhrget>/some/ajax/url</xhrget> and substitutes them with appropriate responses returned by your app. This can be useful if you want to assemble single page with responses returned by many controllers for example. xhrget performs standard GET request as well, and tries to mimick XMLHTTPRequest so you can use “if request.xhr?; render :layout => false; end” the same way you’d use it with JavaScript, to keep your controllers lean and clean.
Defined Under Namespace
Classes: Middleware