Sha256: fe0a5bc5f8f8b0469002088799adb8efd07299e29285fa2e551cd03d1272a82a

Contents?: true

Size: 320 Bytes

Versions: 5

Compression:

Stored size: 320 Bytes

Contents

function remove_fields(link) {
  $(link).prev("input[type=hidden]").val("1");
  $(link).closest(".fields").hide();
}

function add_fields(link, association, content) {
  var new_id = new Date().getTime();
  var regexp = new RegExp("new_" + association, "g")
  $(link).parent().before(content.replace(regexp, new_id));
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
census-0.3.1 generators/census/templates/census.js
census-0.3.0 generators/census/templates/census.js
census-0.2.1 generators/census/templates/census.js
census-0.2.0 generators/census/templates/census.js
census-0.1.0 generators/census/templates/census.js