Forum: Ruby on Rails REST hidden_field verb hack and observe_form conflict?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
67f61f0c385168c4b2e5b8fd733c397f?d=identicon&s=25 Christos Zisopoulos (Guest)
on 2007-02-08 02:40
(Received via mailing list)

I have in routes.rb...

  map.resources :posts, :member => { :preview => :post } posts/_edit.rhtml...

  <% remote_form_for :post, :url => task_path(@post), :id =>
'edit_form' ) do |f| %>
     # rest of the form goes here
  <% end %>
  <%= observe_form "edit_form", :url => preview_post_path(@post) %>

What happens is that the routing code receives the hidden
"_method=put" field from the serialised form and thinks I am doing a
PUT when I am actually trying to do a POST. Needless to say a route
to my preview function can't be found and the app barfs out a routing

Would you say this a bug in the routing code, the observe_form code
or just a nasty usage of the form helper on my part?

This topic is locked and can not be replied to.