Question: I have a controller called Videos. I'd like my URLs to be like this:

```
http://website/1

```

Rather than this:

```
http://website/videos/1

```

I'd also like to keep the functionality of controlling its content via `/videos/` (edit, new, destroy, etc). Basically the `show` action is the only one that would be responding from root.

Is there a way to do this without messing up with the other controllers?

Answer: 
Just add a `/:id` route, that links to `videos#show`:

```
get '/:id' => 'videos#show'

```

You'll need to put this near the bottom of your routes file so that it doesn't match requests for things like `/videos`.
You can create all RESTful routes for a controller, without its name in path by using 

> 
> resources :videos, path: ""
> 
> 
> 

This will create all routes for videos controller like (index, new, edit, create etc)

If you want only a specific route to serve as this then you can pass that too with this like

> 
> resources :videos, path: "", only:[:show]
> 
> 
> 

This will create only your desired path 

<http://website/1>

and will not affect any other controllers.