Forum: Ruby on Rails How do I return values when using form_for

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.
Siddharth R. (Guest)
on 2009-03-27 19:44
Attachment: edit.rhtml (0 Bytes)
Hi I am trying to build a simple app where I'm trying to do pretty what
scaffold does. My question is when I am using 'form_for' how do I return
the id while editing the application like its done in the form_tag

for example

<h1>Editing book</h1>

<% form_tag :action => 'update', :id => @book do %>
  <%= render :partial => 'form' %>
  <%= submit_tag 'Edit' %>
<% end %>

<%= link_to 'Show', :action => 'show', :id => @book %> |
<%= link_to 'Back', :action => 'list' %>

Here the :id=>@book sends the id back so that i can find it in my
controller before i update it similarly how can i send something back
with the form_tag without using the hidden tags.
This topic is locked and can not be replied to.