This is something I’ve built a couple of times over the years, particularly in building custom CMS’s. I don’t remember seeing it written up anywhere, but I’ve used it since the Rails 1.x days. The use case being when the users can create pages on the backend with unique name and someurl slug n (A slug is the part of a URL which identifies a page using human readable words preferably based on
![Building dynamic routes in Ruby on Rails site](https://cdn-ak-scissors.b.st-hatena.com/image/square/8d71ff5111e05619a10d29bb40d7aebaa75c8fbc/height=288;version=1;width=512/https%3A%2F%2Fs0.wp.com%2Fi%2Fblank.jpg)