I have a url redirect controller called “go”. It can redirect topic model and company models. The route.rb looks like this:
resources :go, only: [] do
member do
get :topic
get :company
end
end
Currently it produce the following route:
topic_go GET /go/:id/topic(.:format) go#topic
company_go GET /go/:id/company(.:format) go#company
Is there a good way to make the route to be like this:
/go/topic/:id
/go/company/:id
Just remove the
memberblock entirely and add these two lines aboveresources :go.