#502 ✓resolved
ladybug

Admin subsite route error in cookbook

Reported by ladybug | October 12th, 2009 @ 02:24 PM

I know the page says it is somewhat outdated, but here is an update to http://cookbook.hobocentral.net/recipes/3-create-an-admin-subsite:

First of all, currently if you use the subsite generator with a name parameter admin, hobo generates a subsite called AdminSite. So there is no Admin::AdminController, it should be Admin::AdminSiteController. This is otherwise a minor error, except it means that the route is interestingly wrong on the cookbook web page.

Wrong:
map.admin 'admin', :controller => 'admin/admin', :action => 'index'

Right:
map.admin 'admin', :controller => 'admin/adminSite', :action => 'index'

Note not only the name, but also the interesting camel case! If you just change that to 'admin/adminsite' you will get a runtime error: "uninitialized constant Admin::AdminsiteController". Very stupid.

Comments and changes to this ticket

  • Bryan Larsen

    Bryan Larsen October 14th, 2009 @ 10:03 PM

    • State changed from “new” to “resolved”

    Thanks for the report. I'm loathe to change somebody else's recipe, so I copied your report into a comment on the end. If you want to create your own comment, let me know and I'll delete mine.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages