johnnycakes
johnnycakes

Reputation: 2450

Rails routes: match to nested route

I can't seem to get this right. I want to match a short url to a specific nested route.

I want to do this:

match "/register" => "/businesses/3/customers/new"

How can I do this?

Thanks.

Upvotes: 1

Views: 367

Answers (1)

Gazler
Gazler

Reputation: 84140

Use a redirect.

match "/register" => redirect("/businesses/3/customers/new")

Upvotes: 1

Related Questions