Ticket #405 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

Add :namespace shortcut for routes, fix existing behavior, some general refactoring of router.rb

Reported by: sethrasmuss..@gmail.com Assigned to:
Priority: major Milestone: The Future
Component: Routing Keywords:
Cc:

Description

It seems to me there are too many ways to do a namespace, and some of the existing behavior with :match and :to confuses me as well. I've not removed any of that, however, but I think the new :namespace method should be preferred, documented, encouraged, loved like an only child, etc.

Attachments

merb_router_namespaces.diff (61.2 kB) - added by sethrasmuss..@gmail.com on 01/05/08 19:01:33.

Change History

01/05/08 19:01:33 changed by sethrasmuss..@gmail.com

  • attachment merb_router_namespaces.diff added.

01/05/08 19:45:03 changed by sethrasmuss..@gmail.com

To clarify the new :namespace method..

router.namespace :admin do |admin|
  admin.resources :things
end

.. and you get named routes like :admin_things_path which generates '/admin/things'

01/05/08 19:55:08 changed by e.@brainspl.at

  • status changed from new to closed.
  • resolution set to fixed.

(In [1175]) update routes to use .namespace, closes #405 [sethrasmuss..@gmail.com]