Skip to content
This repository was archived by the owner on Dec 12, 2021. It is now read-only.

Allow to override the wrapper's class name #296

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Allow to override the wrapper div class name
  • Loading branch information
heaven committed Nov 10, 2013
commit 2c2c5b926a0142b579f4f3a92b95703f754594e0
2 changes: 1 addition & 1 deletion lib/nested_form/builder_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def fields_for_with_nested_attributes(association_name, *args)
end

def fields_for_nested_model(name, object, options, block)
classes = 'fields'
classes = options.fetch(:nested_wrapper_class, 'fields')
classes << ' marked_for_destruction' if object.respond_to?(:marked_for_destruction?) && object.marked_for_destruction?

perform_wrap = options.fetch(:nested_wrapper, true)
Expand Down