custom-attributes 0.2.12 → 0.2.15
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/formtastic/custom_attributes.rb +4 -3
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.15
|
@@ -38,8 +38,9 @@ module Formtastic
|
|
38
38
|
|
39
39
|
index = 0
|
40
40
|
value_fields = @object.custom_attributes.attributes_of_type(attribute_type).collect do |attribute|
|
41
|
-
custom_field_input(attribute_type, [attribute_type, storage_type], attribute.label, attribute.value, index, {})
|
41
|
+
result = custom_field_input(attribute_type, [attribute_type, storage_type], attribute.label, attribute.value, index, {})
|
42
42
|
index += 1
|
43
|
+
result
|
43
44
|
end
|
44
45
|
field_template = custom_field_input(attribute_type, [attribute_type, storage_type], "", nil, "%nr%", :template => true)
|
45
46
|
|
@@ -87,7 +88,7 @@ module Formtastic
|
|
87
88
|
:class => "add-link",
|
88
89
|
:title => ::I18n.t(:create_custom_attribute, :scope => [:formtastic, :actions], :attribute => attribute_human_name),
|
89
90
|
:'data-attribute-type' => storage_type
|
90
|
-
) << field_template << label_data_list_for(
|
91
|
+
) << field_template << label_data_list_for(association_name, options[:labels]),
|
91
92
|
:class => "field-addition"
|
92
93
|
)
|
93
94
|
|
@@ -132,7 +133,7 @@ module Formtastic
|
|
132
133
|
if @object.custom_attributes.supported_attribute_types.keys.include? attribute_type
|
133
134
|
"#{@object.class.model_name.underscore}[custom_attributes][#{attribute_type}][#{index}][#{field_type}]"
|
134
135
|
else
|
135
|
-
"#{@object.class.model_name.underscore}[#{attribute_type}_attributes][#{index}][#{field_type}]"
|
136
|
+
"#{@object.class.model_name.underscore}[#{attribute_type.to_s.pluralize}_attributes][#{index}][#{field_type}]"
|
136
137
|
end
|
137
138
|
end
|
138
139
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: custom-attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 15
|
10
|
+
version: 0.2.15
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matthijs Groen
|