1.1.3 kills modularized controllers?

Coda Hale
Wed, 28 Jun 2006 18:07:31 -0000

Howdy all,

I just installed 1.1.3, and all of a sudden my modularized controller
doesn''t have a valid route. Admin::NewsController used to be mapped by
default in 1.1.2, but 1.1.3 doesn''t find it.

The problem appears to be in
ActionController::Routing::ControllerComponent#traverse_to_controller,
which checks to see if the directory "app/controllers/admin/news"
exists, but not that the file
"app/controllers/admin/news_controller.rb" exists (which it does).

My current workaround is to change line 255 of
actionpack/lib/action_controller/routing.rb from this:

  next unless File.directory? path

to this:

  next unless File.directory?(path) || File.exists?(path +
''_controller.rb'')

Obviously this will become a moot point when 1.2 comes out with the
new routing code, but right now 1.1.3 appears to kill the routing to
any modularized controllers, and I don''t know of any way to write a
route to a modularized controller without changing
traverse_to_controller.

Advice?

--
Coda Hale