views:

29

answers:

1

When using scaffolding in Ruby on Rails to build my controller, the scaffold is not adding a map.resource to the routes.rb file. I am having to do this manually to get the view to work. I'm merely following the blog demo they have you create in the tutorial so I'm not doing anything fancy. Shouldn't the scaffold be adding this automatically? As a side-note I'm running in 64 bit windows 7.

Here is the command I am running to create a controller:

c:\myfolder>ruby script/generate model Comment commenter:string body:text post:references 
+2  A: 

Hi,

You should issue the "scaffold" in the command line instead of just "model".

ruby script/generate scaffold Comment commenter:string body:text post:references 
Bragboy
Sorry I copied that directly from the page. I have used the scaffold command previously, same problem.
Graham
It worked. I was just looking in the wrong place. Thanks!
Graham
Great!! Happy 'rail'ing
Bragboy