Rendering partial for table row with form_tag is getting crazy!
- by xopht
I have 23(column)x6(row) table and change the row with link_to_remote function.
each tr tag has its own id attribute.
change link call change action and change action changes the row using render function wit partial.
_change.html.erb
<td id="row_1">1</td>
.
.
omitted
.
.
<td id="row_23">23</td>
link_to_remote function
<%= link_to_remote 'Change', :update => 'row_1', :url => change_path %>
change action
def change
logger.debug render :partial => 'change'
end
If I coded like above, everything work okay. This means all changed-columns are in one row.
But, if I wrap partial code with *form_for* function like below...
<% form_for 'change' do %>
<td id="row_1">1</td>
.
.
omitted
.
.
<td id="row_23">23</td>
<% end %>
Then, one column located in one row and that column is the first column. I've looked up the log file, but it was normal html tags.
What's wrong?