How to set scaffold inmulti directory controller in rails2.x

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 like

ruby script/generate controller admin/sale

   Now edit route.rb and add

map.namespace(:admin) do |admin|
admin.resources :sales
end

Sijo