Kyle Hendricks
2005-Oct-20 03:39 UTC
Newbie: script/generate scaffold problems seems to ignore controller parameter
I''m new to rails and recently I purchased Agile Web Development with Rails. In the Building an Application section I keep getting hung up on the following code: ruby script/generate scaffold Product Admin The script runs fine but it seems to ignore the controller parameter. It generate the view files as app/views/products/ rather than app/views/admin/ any suggestions as to why this is happening would be very helpful. G5:/Library/WebServer/Documents/rails_apps/depot kyleh$ ruby script/ generate scaffold Product Admin exists app/controllers/ exists app/helpers/ create app/views/products exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ create app/models/product.rb create test/unit/product_test.rb create test/fixtures/products.yml create app/views/products/_form.rhtml create app/views/products/list.rhtml create app/views/products/show.rhtml create app/views/products/new.rhtml create app/views/products/edit.rhtml create app/controllers/products_controller.rb create test/functional/products_controller_test.rb create app/helpers/products_helper.rb create app/views/layouts/products.rhtml create public/stylesheets/scaffold.css I''m running Mac OS X Tiger V 10.4.2. Thanks, Kyle Hendricks
tlalinne
2005-Oct-20 13:59 UTC
Newbie: script/generate scaffold problems seems to ignore controller parameter
Hi, Same problem here but on Windows XP. It seems that ''script/generate scaffold Product Admin'' runs as though no controller has been specified and uses the default one ''Product''. The only way to solve this, is to manually rename all the product* files and directories to admin. It''s a pain because each time you change the model you have to repeat that renaming. Hope it helped. -tlalinne
denny@micromls.com
2005-Oct-23 02:30 UTC
Re: Newbie: script/generate scaffold problems seems to ignore controller parameter
I am getting exactly the same error in Windows
Deirdre Saoirse Moen
2005-Oct-23 03:03 UTC
Re: Re: Newbie: script/generate scaffold problems seems to ignore controller parameter
On Oct 22, 2005, at 7:30 PM, denny-9C/VC9mJLxdWk0Htik3J/w@public.gmane.org wrote:> I am getting exactly the same error in WindowsThis was fixed in edge rails earlier today. Thus, you can either: a) use 13.1, which doesn''t have the problem; b) use an edge rails version from today. -- _Deirdre http://deirdre.net