Permalink
Browse files

remove required attr when removing fields

  • Loading branch information...
1 parent e4ac8d7 commit 8b247c11194266ccb0253d0fc088dd1c9165b0ce @ncri committed Jul 23, 2014
@@ -26,6 +26,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'selenium-webdriver', '>= 2.32.1'
gem.add_development_dependency 'sqlite3'
gem.add_development_dependency 'haml', '>= 3.1.5'
+ gem.add_development_dependency 'haml-rails'
gem.add_development_dependency 'sass-rails', '~> 3.2.3'
gem.add_development_dependency 'coffee-rails', '~> 3.2.1'
end
@@ -9,6 +9,8 @@
# require "rails/test_unit/railtie"
require 'jquery-rails'
+require 'haml'
+require "haml-rails"
Bundler.require
require "nested_form_fields"
Binary file not shown.
@@ -35,6 +35,7 @@ nested_form_fields.bind_nested_forms_links = () ->
$nested_fields_container = $link.parents(".nested_fields").first()
$nested_fields_container.before "<input type='hidden' name='#{delete_association_field_name}' value='1' />"
$nested_fields_container.hide()
+ $nested_fields_container.find('input[required]:hidden').removeAttr('required')
$.event.trigger("fields_removed.nested_form_fields",{object_class: object_class});
false

0 comments on commit 8b247c1

Please sign in to comment.