Hi, I am very new to Ruby on Rails. I am going through some books as reference. When I was running my app I mistaken place a letter like: localhost:3000/s and as there was no matching for s in my route.rb I get this error: Routing Error No route matches "/s" with {:method=>:get} So, my question is that; is there any way or exception to handle such condition? Any idea regarding this? -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
yes but be careful, if search engines recieve status 200 for something in you site that does not exist it will be indexed falsely as some thing that exist in you page, so you have to return the correct status. imagine this: a search engine looks for some old content in your page, instead of receiving a not found message it will receive a 200 ok status by default is you have a catch all route that says something like "oppsss not found", it works for a human but search engines will receive an ok and will never remove the old content from the cache. see how is done here. http://railscasts.com/episodes/46-catch-all-route remenber to return the correct status with the redirect -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
It works. Thanks a lot. That''s what I was looking for. On Thu, Dec 9, 2010 at 9:12 PM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > yes but be careful, if search engines recieve status 200 for something in > you site that does not exist it will be indexed falsely as some thing that > exist in you page, so you have to return the correct status. > > imagine this: > > a search engine looks for some old content in your page, instead of > receiving a not found message it will receive a 200 ok status by defaultis> you have a catch all route that says something like "oppsss not found", it > works for a human but search engines will receive an ok and will never > remove the old content from the cache. > > see how is done here. > > http://railscasts.com/episodes/46-catch-all-route > > remenber to return the correct status with the redirect > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.> For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.