Maybe I'm just not getting this, but why wouldn't you pass the URL as a query string?
On Thu, Nov 22, 2012 at 6:58 AM, Dan Brooking <[email protected]> wrote: > I'm not sure where my issue is - if it's in my routes file (maybe I need to > be more specific) or if it's the format of the URL. > > I am working on a screen scraping project just for fun. It is designed where > the URL of the page you are on is passed into the Rails app, so if you are on > http://guides.rubyonrails.org/routing.html > and click the button for my app, it routes to > > http://localhost:3000/pages/http%3A%2F%2Fguides.rubyonrails.org%2Frouting.html > > My routes file has this: > > resources :pages > > The problem I face is it works for part of the URL. So if I do: > > http://localhost:3000/pages/http%3A%2F%2F or > http://localhost:3000/pages/http%3A%2F%2Fguides or > http://localhost:3000/pages/http%3A%2F%2Fguides.rubyonrails > > it works. But as soon as I add in the second '.', I start getting errors. > > http://localhost:3000/pages/http%3A%2F%2Fguides.rubyonrails.org > > gives me: > > Routing Error > No route matches [GET] "/pages/http%3A%2F%2Fguides.rubyonrails.org" > > Any ideas? > > -- > 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 https://groups.google.com/groups/opt_out. > > -- 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 https://groups.google.com/groups/opt_out.

