
Originally Posted by
Eric.Coleman
So, the entire app would only have 2 controllers? If this isn't the case, can you provide me with an example as I don't have a copy of the book... yet.
You can subclass your controllers too, so you can for example have a Products controller in both the admin and client sections. For example, these two commands will create product controllers, one for public use and one for admins*:
Code:
ruby script/generate scaffold Admin::Product
ruby script/generate controller Public::Product
Your controllers would then be under /admin/products/ and /public/products/ respctively.
Off Topic:
* I created a controller on the public side instead of a scaffold because you don't need all the CRUD stuff exposed to the outside
Bookmarks