Welcome Guest | Login

404 Error when adding a view...

...This may be a stupid question, but I create a new view_name.rhtml file in the views/controller_name/ folder, add the

def view_name
end

lines to the controller responsible for it, but when I try access it I get a 404 error. The funny part is that the views created when the controller was created using the script/generate method are alive and kicking. Can anyone explain why this is so?

2008-06-14 02:26 PM

Hi Flanker,

Could you please verify it now. It seems like other view pages are loading fine now. The issue was due to the invalid rake routes given in the config/routes.rb file. I have commented out those invalid map.connect statements.

===
#  map.connect 'money/:screen_name', :controller => 'money', :action => 'show'
#  map.connect 'work/:screen_name', :controller => 'work', :action => 'show'
===

Here the show action is missing from the work and the money controller.















2008-06-14 10:57 PM

Thanks!

2008-06-14 11:19 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up today!