Forum: Ruby on Rails Routes recognition problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5e518814b76962fdd1ad0e74dfac5ea7?d=identicon&s=25 Martin Gamsjaeger (Guest)
on 2006-05-24 04:55
(Received via mailing list)
Hiall,

I have two modules for my controllers containing the following files

/app/controllers/admin/new_controller.rb
/app/controllers/admin/list_controller.rb
/app/controllers/admin/sidebar_controller

/app/controllers/community/input_controller.rb
/app/controllers/community/sidebar_controller.rb

Each of those controllers is declared with the appropriate module like
so

class Admin::NewController < ApplicationController
  # ...
end

class Admin::ListController < ApplicationController
  # ...
end

class Admin::SidebarController < ApplicationController
  # ...
end

class Community::InputController < ApplicationController
  # ...
end

class Community::SidebarController < ApplicationController
  # ...
end

I have the following subdirectories in app/helpers

app/helpers/admin
app/helpers/community

along with helper definitions respecting the subfolder->module
convention like so

module Community::InputHelper
  # ...
end

Under views I have subdirectories for the modules like so

app/views/admin/new
app/views/admin/list
app/views/admin/sidebar

app/views/community/input
app/views/community/sidebar

I have my routes.rb setup with one additional route

  # Prefix all routes with webca
  map.connect 'webca/:controller/:action/:id'

  # Install the default route as the lowest priority.
  map.connect ':controller/:action/:id'

NOW:
All actions for controller 'admin/new' are found
webca/admin/new/consultant WORKS
webca/admin/new/webca WORKS

However,the following routes DO NOT WORK (although they are "the same"
imo)
webca/community/input/general_data DOESN'T WORK
webca/community/input/administration DOESN'T WORK

The urls for 'admin/xxx' controllers even work using the lower
priority route :controller/:action/:id as expected. The urls for
'community/input' controller don't even work with this route!

I have doublechecked everything but I can't find any
conceptual/syntactical/whatever difference between these two routing
scenarios!

ANY help very much appreciated!

cheers
Martin
This topic is locked and can not be replied to.