Is it possible to use the render method of a controller to render the content of a Mechanize object? I tried:
def new
a = Mechanize.new
a.get('http://flickr.com/')
render :html => a.current_page
end
which throws an error, as well as render :text => a
, a.page
, and a.current_page
.
I understand that the render
function is not expecting a Mechanize object, I just don't know what it wants and how to get it there.
I am at the beginning stages of my development and researching all web scraping frameworks for Ruby and any help would be appreciated.