Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Using .html() on the selector removed the outer .fields div of the bl…

…ueprint markup. Now we're adding the selector directly to the dom instead of the results of .html().
  • Loading branch information...
commit 88131b72f6cf9b0c61ad59d992d5407c07fdad30 1 parent 949959a
@kevinrood authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  lib/generators/nested_form/templates/jquery_nested_form.js
View
3  lib/generators/nested_form/templates/jquery_nested_form.js
@@ -38,9 +38,8 @@ jQuery(function($) {
// initialized with an Id *before* saving. The nested_form html template is based on a new object.
var content_selector = $(content);
$('input', content_selector).filter(function() { return this.name.match(/\[id\]$/); }).val('');
- content = content_selector.html();
- var field = $(content).insertBefore(this);
+ var field = $(content_selector).insertBefore(this);
$(this).closest("form").trigger({type: 'nested:fieldAdded', field: field});
return false;
});
Please sign in to comment.
Something went wrong with that request. Please try again.