This project is archived and is in readonly mode.

#6095 ✓invalid
Karl Adam

Nested Routing in Rails 3.0 results in "route set not finalized" error

Reported by Karl Adam | December 1st, 2010 @ 12:38 AM

Created a new project and in it two models: conferences and events. I then nested events below conferences in my routes.rb file and in testing it all seemed to work until I tried creating any new events or editing existing events below conferences and would repeatedly get "route not found" errors for the POST request. None of the member functions for update or create were even being reached.

Since |resources| takes care of the generation of all those paths, this made no sense. Afterward I used 'rake routes' to determine all the known routes of which |update| and |create| did appear correctly.

I went further and entered the 'rails console' and assigned the router to a variable to interrogate the known paths. Printing the known routes was successful however any use of |recognize_path| or |generate| on the Routing object resulted in a "route set not finalized" error.

There's something in the bowels of the routing system that is not working properly but is working well enough until you need to do create/update operations or introspect the object.

Routes.rb :
Rails Console Session :

Comments and changes to this ticket

  • Karl Adam

    Karl Adam December 1st, 2010 @ 12:52 AM

    Thanks to some excellent help in the #rubyOnRails channel on freenode, it was pointed out to me that this was in fact user error. The original problem was in my form partial not passing both objects as an array to form_for and the 'route set not finalized' error was due to not first calling finalize on the Router.

  • Aditya Sanghi

    Aditya Sanghi December 1st, 2010 @ 07:52 AM

    • State changed from “new” to “invalid”
    • Importance changed from “” to “Low”


Create your profile

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

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>