C:\ruby\depot>ruby script\generate scaffold Product
wrong number of arguments (1 for 2)
How can i fix this?
Posted via http://www.ruby-forum.com/.
> C:\ruby\depot>ruby script\generate scaffold Product
You're leaving out the controller name. If you're following the book
It should be
ruby script/generate scaffold product admin
I am also having the same problem.
command: ruby script/generate scaffold product admin
the above command creates controller as well as default view.
command: ruby script\generate scaffold Product code:integer name:string
In the above command, I don't specify controller, so how will the
controller and views will be created?
Look up information on REST and RESTful Rails for more explanation.
Ruby in Practice
My free Ruby e-book
I trying to follow the AWDWR 2nd Edition book and I've seen your
suggestion in other place too. I can't see the point though, what is the
point on learning an obsolete version of rails when the new one is
obviously so different! Does anybody know how to work around this
problem with Rails 2.x?
You don't need to destroy the model!
ruby script\generate scaffold Product
will create a controller called Products. I'm just using that controller
instead of the admin one.