Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Resolved Issue #122 #123

Closed
wants to merge 1 commit into from

2 participants

@lest
Collaborator

Cherry-picked 38932c2. Thanks!

@lest lest closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 5, 2011
  1. @kevinrood

    Resolved Issue #122

    kevinrood authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/generators/nested_form/templates/jquery_nested_form.js
View
2  lib/generators/nested_form/templates/jquery_nested_form.js
@@ -6,7 +6,7 @@ jQuery(function($) {
// Make the context correct by replacing new_<parents> with the generated ID
// of each of the parent objects
- var context = ($(this).closest('.fields').find('input:first').attr('name') || '').replace(new RegExp('\[[a-z]+\]$'), '');
+ var context = ($(this).closest('.fields').find('input:first').attr('name') || '').replace(new RegExp('\[[a-z_]+\]$'), '');
// context will be something like this for a brand new form:
// project[tasks_attributes][new_1255929127459][assignments_attributes][new_1255929128105]
Something went wrong with that request. Please try again.