Nested Resources causes MethodNotAllowed error


#1

I want to make every line in a doc in-place-editable.
rails 2.2.2

routes.rb
map.resources :docs do |doc|
doc.resources :lines
end

view-server-side
new Ajax.InPlaceEditor(‘line<%=line_number +1%>’, ‘<%= doc_line_path
(:doc_id => @doc.id,:id => line_number) %>’);

view-client-side
new Ajax.InPlaceEditor(‘line5’, ‘/docs/4/lines/4’);

log
ActionController::MethodNotAllowed (Only get, put, and delete requests
are allowed.)

if i change the doc_line_path to doc_lines_path
view-client-side
new Ajax.InPlaceEditor(‘line5’, ‘/docs/4/lines?id=4’)

log
Processing LinesController#create (for 127.0.0.1 at 2009-01-24
13:10:52) [POST]

what i want is LinesController#update.
why the url ‘/docs/4/lines/4’ can not be mapped to the “update”
action of LinesControlelr?
Is it a defact of rails2.2.2?

Anyone can help?