#251 ✓resolved
Matt Jones

Routing(?) failure when removing auto_actions in development

Reported by Matt Jones | August 29th, 2008 @ 11:41 PM | in Hobo 1.0 - Final

To reproduce: (on

  • follow the Agility tutorial, up to the part about removing auto_actions.
  • start the server, and note that everything works (Tasks still on the menus)
  • add the :except => :index line to TasksController
  • WITHOUT restarting the server, click on most anything (the Projects tab, for instance)
  • The result page comes up "The page you were looking for was not found", but the logs don't show an error.

Will investigate.


Comments and changes to this ticket

  • Matt Jones

    Matt Jones August 29th, 2008 @ 11:51 PM

    One additional thing - I overlooked the message in the log; somehow the request to /projects is being sent to ProjectController#show, which obviously doesn't know what to do...


  • Tom Locke

    Tom Locke September 3rd, 2008 @ 03:20 PM

    • Milestone set to Hobo 1.0 - Final
    • State changed from “new” to “open”
  • Matt Jones

    Matt Jones September 6th, 2008 @ 09:05 AM

    There appear to be two parts to this bug:

    (1) resource_routes in model_router.rb doesn't quite match the ActionController original. The Rails version adds a requirement to routes using :id that keeps it from being nil. This helps split /projects from /projects/:id . I've pushed a fix for that part. (commit e330d96)

    BUT (2) There is a severe bug in the Rails optimized router. In short, it generates code to look up routes in ActionController::Routing::Routes.routes that references specific index value, but DOESN'T regenerate it if the routes are reloaded. Removing some routes, as this example does, moves elements around in the routes array. I'm preparing a simplified example to submit to Rails core.


  • Matt Jones

    Matt Jones September 6th, 2008 @ 09:05 AM

    • Assigned user set to “Matt Jones”
  • Matt Jones

    Matt Jones September 6th, 2008 @ 09:08 AM

    • State changed from “open” to “investigating”
  • Matt Jones

    Matt Jones September 6th, 2008 @ 01:03 PM

    I've submitted a patch for this on the Rails lighthouse:


    Now let's hope it gets committed...

  • Tom Locke

    Tom Locke September 6th, 2008 @ 01:37 PM

    Well done Matt : ) I wasn't looking forward to figuring this one out!

    Any possibility to monkey-patch for now? It's a real shame that people often hit this as soon as they try Hobo for the first time.

  • Matt Jones

    Matt Jones September 6th, 2008 @ 09:58 PM

    • State changed from “investigating” to “resolved”

    Attached is an initializer that will patch the routing code to work correctly. Just drop it into config/initializers and it should fix the bug. Also definitely closes #252.

    FWIW, the patch on the Rails lighthouse has been marked "2.1.2"...

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


Referenced by