nested_fields_rails 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,7 +45,12 @@ module NestedFieldsRails
|
|
45
45
|
alias default_fields_for_nested_model fields_for_nested_model
|
46
46
|
def fields_for_nested_model(name, object, options, block)
|
47
47
|
tag = options[:element_wrapper] || (options[:wrapper] && options[:wrapper].to_sym == :table ? :tr : nil) || :div
|
48
|
-
|
48
|
+
html_attributes = {
|
49
|
+
:class => 'fields',
|
50
|
+
'data-object-id' => options[:child_index] || object.object_id,
|
51
|
+
:style => object._destroy ? 'display: none;' : ''
|
52
|
+
}
|
53
|
+
@template.content_tag(tag, default_fields_for_nested_model(name, object, options, block), html_attributes)
|
49
54
|
end
|
50
55
|
|
51
56
|
private
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nested_fields_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-03 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Manage multiple models in the same form
|
15
15
|
email:
|