Hi :
If I want to show http://localhost/admin/sales ,not
http://localhost/saqles,
I use command ruby script/generate scaffold admin/Sale,but it is failed.
How to do it please?
thanks.
cruise
Hi :
If I want to show http://localhost/admin/sales ,not
http://localhost/saqles,
I use command ruby script/generate scaffold admin/Sale,but it is failed.
How to do it please?
thanks.
cruise
You should use:
ruby script/generate scaffold admin::Sale
On Dec 19, 6:30 am, Near C. [email protected]
Hi :
Sorry,I have tried it and failed.
It will generate table admin_sales in database ,and nothing in
http://localhost/admin/sales/
Thanks.
Cruise
Bosko I. wrote:
You should use:
ruby script/generate scaffold admin::Sale
On Dec 19, 6:30�am, Near C. [email protected]
http://localhost/admin/sales
Here you mean admin as a name space and sale as resource. Is it?
If so then do like
ruby script/generate controller admin/sale
Now edit route.rb and add
map.namespace(:admin) do |admin|
admin.resources :sales
end
Sijo
Hi :
Thank you.
I got it by following the answer.
Cruise.
Sijo Kg wrote:
http://localhost/admin/sales
Here you mean admin as a name space and sale as resource. Is it?
If so then do likeruby script/generate controller admin/sale
Now edit route.rb and add
map.namespace(:admin) do |admin|
admin.resources :sales
endSijo
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs