Ok, what I want to achieve is: http://<mydomain>/admin/products calls app/controllers/admin/products_controller.rb According to Agile Development with Rails this should work. I executed the follwing commands: rails myproj cd myproj script/generate controller Admin script/generate scaffold Admin::Product this creates app/controllers/admin/products_controller.rb all the views & Product model, but doesnt actually route. http://<mydomain>/admin/products just gives me: Unknown action No action responded to product Any ideas?
on 2006-03-29 12:02
on 2006-03-29 12:45
You (probably) can't have admin controller, because it's the name of your group. If you want all your admin controllers have some common functionality, you can create admin_base controller (its name has to be different than 'admin') and inherit all your admin controllers from this one. I don't know if there's any difference, but you can do Admin/Product instead of Admin::Product.
on 2006-03-30 19:26
I am trying to do the same thing, but I am not sure I want urls to look like: /admin/base/index Are there any decent alternatives? -John -- John Smilanick Computing Staff - Webmaster Kavli Institute for Theoretical Physics University of California, Santa Barbara firstname.lastname@example.org (805) 893-6307
on 2006-03-30 19:32
You can edit your routes.rb to make your urls look any way you want. On Thu, 2006-03-30 at 09:22 -0800, John Smilanick wrote: > > > > functionality, > > -- > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails Charlie Bowman Programmer Castle Branch Inc.