How to set scaffold inmulti directory controller in rails2.x

You should use:

ruby script/generate scaffold admin::Sale

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 Ivanisevic 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

Hi :
Thank you.
I got it by following the answer.

Cruise.

Sijo Kg wrote: