Hello All,
I am new to ruby, so please excuse me.
problem is --------
I have a model named "Album"
I want to update all records from "albums" table in a single form and
single button "Update".
my code for view ---
<% form_for :album, :url => { :action => "update", :id =>
album.id } do
|f| %>
<%= f.error_messages %>
<td><%= f.text_field :title, :value =>
"#{album.title}"%></td>
<td><%= f.text_field :year, :value => "#{album.year}"
%></td>
<td><%= f.text_field :language, :value =>
"#{album.language}" %></td>
<td><%= f.text_field :display_css, :value =>
"#{album.display_css}"
%></td>
<td><%= submit_tag ''Update'' %></td>
<% end %>
this shows only one record. But i want all records display in form and
single Update button.
How I use for loop?
How I do this?
Please help me.
Thanks,
Viki
--
Posted via http://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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---