routes - Rails routing for nested controller's catch-all -
in rails 3, how make controllers/actions including nested controllers work without specifying them in routes.rb?
i uncommented following line, doesn't work nested controller.
match ':controller(/:action(/:id(.:format)))' i want make /preview/draft1/index work.
thanks.
sam
you need make route contraint on controller:
match ':controller(/:action(/:id(.:format)))', :controller => /preview\/[^\/]+/ where "preview" name of namespace.
and then:
match ':controller(/:action(/:id(.:format)))' for more info: http://edgeguides.rubyonrails.org/routing.html#dynamic-segments
Comments
Post a Comment