On Aug 16, 6:17 pm, Fritz Trapper <[email protected]> wrote:
> Editing records of my model requires an intermediate layer of software,
> so I cannot use form_for for data aqusition.
>

I'm not sure that's true (you don't have to use the form builder for
the actual inputs), but the core issue is probably that it's expecting
the update to be a PUT request.

Fred
> My edit action calls the form. But submitting the data always ends with
> a "Unknown action" response:
>
>    No action responded to 6. Actions: create, destroy, edit, index, new,
> show,
>    and update
>
> 6 is the id of the record to be edited.
> The URL ishttp://localhost:3000/finders/6
>
> Here are the relevant snippets of code:
>
> controller:
>     def edit
>       @finder = Finder.find(params[:id])   # a record of the model
>     end
>
> view:
>    <% form_tag(:action => 'update', :id => @finder.id ) do %>
>   <%= submit_tag 'store' %>
>    <% end %>
>
> routes.rb:
> ActionController::Routing::Routes.draw do |map|
>   map.resources :finders
>
>   map.connect ':controller/:action/:id'
>   map.connect ':controller/:action/:id.:format'
> end
>
> Any idea, how to fix it?
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to