/ Published in: Rails

Add this to .irbrc. Allows the following in console:
gethtml('/login') => HTML of whatever page is generated by /login
Expand |
Embed | Plain Text
class Object def gethtml(options = {}) url=app.url_for(options) app.get(url) puts app.html_document.root.to_s end end
You need to login to post a comment.