hi,
i have installed
ruby 1.8.6 window version,
rails 2.1.0
everything runs fine except SCAFFOLD
when i run
ruby script/generate scaffold modelname controllername actions
e,g. C:depot>ruby script/generate scaffold Product Admin
it gives following error
"WRONG NUMBER OF ARGUMENTS (1 FOR 2)"
i tried with many dummyprojects and tutorial,
BUT if i run
ruby script/generate scaffold modelname
e.g ruby script/generate scaffold Product
IT'S RUN FINE
SEE THE FOLLOWING
D:\svn\trunk\workspace\test>ruby script/generate scaffold Product Admin
exists app/models/
exists app/controllers/
exists app/helpers/
create app/views/products
exists app/views/layouts/
exists test/functional/
exists test/unit/
exists public/stylesheets/
create app/views/products/index.html.erb
wrong number of arguments (1 for 2)
BUT RESULTS ARE A BIT DIFFERENT ,
i am looking for Modelname "Product", Controllername "Admin"
and Actions "show.rhtml, new.rhml, edit.rhtml,_form.rhtml"
BUT RESULTS ARE
Modelname "Product" , Controllername "Products",and Actions
"show.html.erb,new.html.erb,edit.html.erb,index.html.erb"
hi,
i have installed
ruby 1.8.6 window version,
rails 2.1.0
everything runs fine except SCAFFOLD
when i run
ruby script/generate scaffold modelname controllername actions
e,g. C:depot>ruby script/generate scaffold Product Admin
it gives following error
"WRONG NUMBER OF ARGUMENTS (1 FOR 2)"
i tried with many dummyprojects and tutorial,
BUT if i run
ruby script/generate scaffold modelname
e.g ruby script/generate scaffold Product
IT'S RUN FINE
SEE THE FOLLOWING
D:\svn\trunk\workspace\test>ruby script/generate scaffold Product
Admin
exists app/models/
exists app/controllers/
exists app/helpers/
create app/views/products
exists app/views/layouts/
exists test/functional/
exists test/unit/
exists public/stylesheets/
create app/views/products/index.html.erb
wrong number of arguments (1 for 2)
BUT RESULTS ARE A BIT DIFFERENT ,
i am looking for Modelname "Product", Controllername "Admin"
and Actions "show.rhtml, new.rhml, edit.rhtml,_form.rhtml"
.rhtml is no longer rails conventions for view templates. The results
below are correct.
BUT RESULTS ARE
Modelname "Product" , Controllername "Products",and Actions
"show.html.erb,new.html.erb,edit.html.erb,index.html.erb"
PLZ HELP ME WHAT'S GOING WRONG
you don't need the "controllername actions" when using scaffold. a
RESTful controller will be generated for you.