2009/10/1 Robert Walker <[email protected]>: > > Mauricio Szabo wrote: > >> But if you require 'open-uri': >> >>>> require 'open-uri' >> => true >>>> open("http://example.com/").read >> => "<HTML>\r\n<HEAD>\r\n <TITLE>Example Web Page</TITLE>\r\n</HEAD> \r >> \n<body> \r\n<p>You have reached this web page by >> typing"example.com",\r\n"example.net",\r\n or >> "example.org" into your web browser.</p>\r\n<p>These domain >> names are reserved for use in documentation and are not available \r >> \n for registration. See <a href="http://www.rfc-editor.org/rfc/ >> rfc2606.txt">RFC \r\n 2606</a>, Section 3.</p>\r\n</BODY>\r\n</HTML>\r >> \n\r\n" > > Wow! This is a bad idea. Including a full page inside another page just > makes my skin crawl. If I absolutely had to do something like this I > would maybe grab the page using open(...), but then strip out only the > contents inside the body tag and render that inside the final page. > Otherwise you'll never be able to get a clean validation anything using > that "navbar page." > --
I don't believe the OP ever said that it would be a full page that he would be including. He is just trying to access partials from one of his servers on another. Presumably some of the data for the remote one is not accessible to the local one. Colin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

