I have a WP site with "/page/" routing pattern for static pages and "/category/" for categories. So WordPress understands that "/about/" is a page and "/science/" is a category. Now I'm trying to move it on Rails with same routing. Both "Page" and "Category" are models and they should be able to be edited from an admin area. How can i make it clear for Rails to check for existing page and if there is no page then check for a category?
P.S. I know I could do '/pages/:url/' but I'm really interested in how to do what i've asked before.