I'm crazy with multiple forms in the same page.
every working fine when there is one unique form and you can identify the unique id or unique class of this form or column...etc.
But my big problem come back when I have multiple forms in the same page. I want rendered the partial create_index when I create a new comment, in create.js.erb I have:
$("<%= escape_javascript(render 'create_index') %>").hide().prependTo(".comments_column").fadeIn(1500);
The problem is that if there are many columns above forms with the class .comments_column the comment its rendered in every columns with the same class.
A example in jquery is this:
http://jsfiddle.net/minitech/aC92Q/8/
For rails 3.1 don't working this example. If I put that javascript in create.js.erb. The first time don't show the comment created.
If I put only in create.js.erb:
$("<%= escape_javascript(render 'create_index') %>").hide().prependTo(".comments_column").fadeIn(1500);
rendered the partial in every column that contain the class .comments_column.
My question is How say to rails 3 the form or button that I am hit for render the partial only in this column?