namespace :admin do
resources :posts do
collection do
get 'whatever'
end
end
end
I was 开发者_开发技巧expect that will generate 'whatever_admin_posts_path' helper method, but it didn't.
It's there something wrong with my codes? Or a bug in rails?The namespace isn't typically added to the method that returns the route. So you probably have a route whatever_posts_path
. The rake task rake routes
is particularly useful in these cases. The first part of the display for each route is the name of the method you can use to access it (if available).
精彩评论