Forum: Ruby on Rails Nested Resources cause MethodNotAllowed error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
乱翻字典 (Guest)
on 2009-01-24 07:25
(Received via mailing list)
I want to make every line in a doc in-place-editable.
rails 2.2.2

routes.rb
map.resources :docs do |poem|
    poem.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?
waiting for you help.
This topic is locked and can not be replied to.