My app caches web pages
On pages#new, when you submit a URL (without the http://
prefix) a page is created and you're redirected to the show, something like pages/4
where 4 is the ID
I'm trying to add friendly_id but am running into issues after adding extend FriendlyId
and friendly_id :url
to my Page
model
If I supply "yahoo.com", the redirect goes to page/yahoo.com. yahoo.com is interpreted as {"id"=>"yahoo", "format"=>"com"}
and rails tells me Couldn't find Page with id=yahoo
If I supply "yahoo.com/index.html", the redirect goes to page/yahoo.com/index.html but then I simply get No route matches [GET] "/pages/yahoo.com/index.html"
How do you think I can solve this?