I was tring out below scenario:
Approach 1: Created an resource using rails scaffold, coded all the functionality i.e. index, new, edit and delete functionality – everything is working fine.
Approach 2: Tried to create manually the controller and views for the same functionality with different name for the model created in approach 1. The functionality is working fine.
But i get an RoutingError as:
Started GET "/userwebmgmts/stylesheets/ctlCalendar.css" for 127.0.0.1 at 2011-08-29 17:08:37 +0530
ActionController::RoutingError (No route matches "/userwebmgmts/stylesheets/ctlCalendar.css"):
In Route.rb file:
added the entry for the newly created controller/view as: get "userwebmgmts/index"
Can anyone help tell why i am getting the error for the controller created manually and not getting the error for the resources created using scaffold?
Thanks,
Sudhir C.N.
This is just a shot in the dark from the information you provided but…
Rails routes work in an order first a rack application checks the
/public/folder in the root of your application. If there is a matching file then it will load that.Then it will load up the routes file and start ticking though your routes
If no route matches then you will get an exception thrown.
Your Problem
Your problem probably comes from the fact that your css is in the wrong place
With your file structure
You should have a link in the page header that looks like this
And the file should be located at