I have narrowed this down a little bit, perhaps. Still looks like --
for a reason I cannot determine -- the routing is not being generated
correctly for autocomplete on a New page:
The dryml code for autocomplete in the Edit page is generating this
route, which works fine as a standalone in the browser:
http://localhost:3000/collections/complete_custodian_name?query=and&id=1
For the working (edit controller) situation, here's what the log
output shows about the routing:
Processing CollectionsController#edit (for 127.0.0.1 at 2009-05-26
20:35:26) [GET]
Parameters: {"id"=>"1-archive-pst"}
... and when keys are typed in the autocomplete field:
Processing CollectionsController#complete_custodian_name (for
127.0.0.1 at 2009-05-26 20:35:38) [GET]
Parameters: {"id"=>"1", "query"=>"a"}
Now, from the New Collection page, here's the development.log output.
Best clue may be that this is processing ApplicationController#index
-- not sure how or why it's getting there. Maybe because there is no
current object -- i.e., the current id is nil? Not sure why
complete_custodian_name needs an id as a parameter anyway....
Processing CollectionsController#new (for 127.0.0.1 at 2009-05-26
20:41:43) [GET]
...
Processing ApplicationController#index (for 127.0.0.1 at 2009-05-26
20:41:57) [GET]
Parameters: {"query"=>"and"}
ActionController::RoutingError (No route matches "/thiss/
complete_custodian_name" with {:method=>:get}):
so I spend the last hour or so trying to read model_router.rb and
model_controller.rb, but I'm afraid it's beyond my current level of
expertise to parse that source. Too many layers, and I don't know
where to begin.
Help!