Displaying 1 result from an estimated 1 matches for "cdcreatorcontroller".
2007 May 15
2
openURI not capturing pages from the same rails app
Hi,
I am using standard Ruby library openURI to capture the HTML code from
other pages. The problem openURI does not work for capturing pages from
the same rails application.
Here is the code:
class CdCreatorController < ApplicationController
require ''open-uri''
def generate
lines = []
file = open("http://127.0.0.1:3001/cd_creator/product/1"){ |f|
f.each_line {|line| lines << line}}
@obj = lines
end
def product
@product = Product.find(para...