Skip to content
Browse files

Added ability to suppress the fields element

  • Loading branch information...
1 parent 0ce05e9 commit 017bf719e100d34f33f062019ed7e33587589c82 @wgrrrr wgrrrr committed Mar 9, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/nested_form/builder_mixin.rb
View
4 lib/nested_form/builder_mixin.rb
@@ -75,9 +75,9 @@ def fields_for_with_nested_attributes(association_name, *args)
end
def fields_for_nested_model(name, object, options, block)
- output = %(<#{options[:wrapper_tag]} class="fields#{options[:wrapper_class]}">).html_safe
+ output = options[:suppress_fields] ? '' : %(<#{options[:wrapper_tag]} class="fields#{options[:wrapper_class]}">).html_safe
output << super
- output.safe_concat("</#{options[:wrapper_tag]}>")
+ output.safe_concat("</#{options[:wrapper_tag]}>") if not options[:suppress_fields]
output
end
end

0 comments on commit 017bf71

Please sign in to comment.
Something went wrong with that request. Please try again.