Imagine I have a simple scaffolded model Order, controller
OrderControllers with all the default views etc.

Then I modify routes to have all actions except index and show be
available under /admin subdirectory:


  resources :orders, :only => [:index, :show]
  scope '/admin' do
    resources :orders, :except => [:index, :show]
  end

And after that on my index and show pages the following helper

  link_to 'Show', @order
or
  link_to 'Show', order

generate links that look like: 'http://localhost:3000/admin/orders/1'
which is obviously incorrect and leads to Routing Error.

I know how to work around this (I'm using link_to 'Show', {action =>
'show', :id => @order}) just wondering this is expected behavior for
some reason or a bug?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to