#247 √ resolved
Peter

Namespaced resource routes using :namespace is not working

Reported by Peter | April 4th, 2008 @ 09:22 AM

Resource route with :namespace is not working:

r.resources :products, :namespace => 'admin'

merb.show_routes output:

Named Routes
  edit_admin_product: /products/:id/edit
  delete_admin_product: /products/:id/delete
  admin_products: /products
  admin_product: /products/:id
  new_admin_product: /products/new
Anonymous Routes
 /products/?(\.:format)?
  /products/index(\.:format)?
  /products/new
  /products/?(\.:format)?
  /products/:id(\.:format)?
  /products/:id[;/]edit
  /products/:id[;/]delete
  /products/:id(\.:format)?
  /products/:id(\.:format)?

This works:

r.namespace :admin do |admin|
  admin.resources :products
end

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »