Displaying 1 result from an estimated 1 matches for "cd_creator".
2007 May 15
2
openURI not capturing pages from the same rails app
...L 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(params[:id]) {|f| f.each_line {|line| p
line} }
end
end
When I call method generate I get an TimeOut Error (execution expired).
But this method works ju...