Object creation when the controller is a subclass of AdminController

I’ve finally determined that the best way to handle administration of
a model that displays publicly but is administered privately is
through subclassing but I’ve run in to pathing issues (I think) when
trying to create an instance of my model.

Let’s say I have a Book, and BookController is a sublcass of
AdminController so that I can create and delete Books via an Admin
section. Everything is going smoothly, I’ve set up my resources so
that my controller falls under /admin but it seems to me like my “new
Book” form generates it’s action path for books, not Admin Books even
though it’s within the views/admin/book folder.

My form is very simple…

form_for @book do |f|…, whose action should be admin/book/create (or
new?, it’s RESTful).

With this, loading book/new tells me “books_path not found”. Does my
application not recognize that the current view is under the admin/
folder? Do I have to specify the url?

Only took me 2 hours but I’ve answered my own question. I pluralized
my controller; went from BookController to BooksController. I also
changed my form_for call to "form_for [:admin, @book], bam! Works
like a charm. I was trying to avoid specifying a path and I was able
to do so this way.

Dave K.