When I started developing my application I grouped my controllers in the followin g fashion: User::ControllerName. Now I've realized that the 'User' module is a misnomer for my current controllers and I need to use the User module for something else, so I decided to change the controllers in the 'User' module to 'Data'. I've changed the directory structure and updated all Controllers to reflect this change, but it doesn't want to work.. Here is the structure as it looks now: -controllers --data ---xxx_controller.rb ---.... -helpers --data ---xxx_helper.rb -models (No changes were made) --xxx.rb -views --data ---controllername... ------------------------- Inside the controller files, I've updated "class User::Controllername" to "class Data::Controllername". I've changed all references to 'User' in my templates, but it doesnt want to work! When I try to open http://localhost:3000/data/controllername I get: Routing Error Recognition failed for "/data/controllername" My development log shows: f:/programming/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:249: warning: toplevel constant Guide referenced by Data::Guide 127.0.0.1 - - [28/May/2006:13:42:33 Eastern Daylight Time] "GET /data/guide/ HTTP/1.1" 404 600 - -> /data/guide/ Any suggestions? Am i missing anything obvious here? Thanks in advance. Ilya
on 2006-05-28 21:43
on 2006-05-28 22:45
Right, so after double/triple checking every file I decided to try something: ruby script/generate controller Data::Test After which I got: The name 'data' is reserved by Ruby on Rails. Please choose an alternative and run this generator again. Oops! I renamed my "Data" module to "Doc" and everything is back to normal. Oi!