Forms and Tables
I had a very weird situation today where a simple form I had created in rails would not work for the edit action. It would work ok for the new action. But if I tried to edit an entry, the submit button wouldn’t do anything.
And after googling around a bit, I found that forms cannot go inside of tables. So to fix it, I changed it to this.
<%= form_for(@attendee) do |f| %>
| Firstname | <%= f.text_field :firstname %> |
| Lastname | <%= f.text_field :lastname %> |
| <%= f.text_field :email %> | |
| <%= f.submit 'Submit' %> |
Then things worked fine. Weird.