rails/rails — Issue #4158: Routing messed up when controller's action has underscore
Author: mabounassif
Created: 2011-12-24 03:47:17+00:00
State: open

I have the following in my route.rb file:
`
scope(:path => 'refinery', :as => 'refinery_admin', :module => 'refinery/admin') do
scope(:path => 'blog', :as => 'blog', :module => 'blog') do
resources :settings do
collection do
get :notification_recipients
post :notification_recipients

get :moderation
get :comments
get :teasers
end
end
end
end
`
and my controller has:
`
module ::Refinery
module Admin
module Blog
class SettingsController < ::Refinery::AdminController

def notification_recipients
# stuff
end
end
end
end
end
`

I would get the following error:
`
No route matches {:controller=>"refinery/admin/blog/settings", :action=>"notification_recipients"}
`

If I removed the underscore things are back to normal.