diff --git a/lib/nested_form/builder_mixin.rb b/lib/nested_form/builder_mixin.rb index 26a98877..a30c90eb 100644 --- a/lib/nested_form/builder_mixin.rb +++ b/lib/nested_form/builder_mixin.rb @@ -88,8 +88,9 @@ def fields_for_with_nested_attributes(association_name, *args) end def fields_for_nested_model(name, object, options, block) - classes = 'fields' + classes = 'fields ' classes << ' marked_for_destruction' if object.respond_to?(:marked_for_destruction?) && object.marked_for_destruction? + classes << options.fetch(:class, '') perform_wrap = options.fetch(:nested_wrapper, true) perform_wrap &&= options[:wrapper] != false # wrap even if nil