Try this
<tr>
<td colspan="3">
<% form_for :vendor do |f| -%>
<%= f.text_field :name, :size => 15 %>
<%= f.text_field :location, :size => 15 %>
<%= f.submit 'save' %>
<% end -%>
</td>
</tr>
On Jan 18, 5:39 am, Shilo Ayalon <[email protected]>
wrote:
> Frederick Cheung wrote:
> > On 18 Jan 2009, at 12:04, Phlip wrote:
>
> > IIRC tr elements can only contain td elements. You can't put a form
> > there.
>
> > Fred
>
> Fred - I suppose you're right. I tried changing this:
>
> <tr>
> <% form_for :vendor do |f| -%>
> <td><%= f.text_field :name, :size => 15 %></td>
> <td><%= f.text_field :location, :size => 15 %></td>
> <td><%= f.submit 'save' %></td>
> <% end -%>
> </tr>
>
> to this (simple table row):
>
> <tr>
> <td>one</td>
> <td>two</td>
> <td>three</td>
> </tr>
>
> and it worked.. Is there no way to render anything other than <td/th>
> tags inside <tr> ?
> --
> 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
-~----------~----~----~----~------~----~------~--~---