simple_form_nested_fields 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/simple_form_nested_fields/nested_fields_builder.rb +6 -4
- data/lib/simple_form_nested_fields/version.rb +1 -1
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6503b66d302d584519904f940376f2d31dad4c1d8b70ed35f21e1b18949236db
|
4
|
+
data.tar.gz: 944ab3847f631786be2f648c99c0cff69def74146edc9fe6065e61c2cd3691ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad749bc8d209f5c081b3228a7139bd4e4038e08ebb1057c68ee487fb28bfe07885d7be2b9fba2f289b3c9fb8ab3c40ef82b37600afd8c34a531aa20edebfb9cc
|
7
|
+
data.tar.gz: d92e37368e2f8db9e85c52d554c2f4cc82f05a5b84f8eee29141bffcba6c09cf9da5dc1e944dfec3ec7ab7754aea007a16c75eb1ab6c89e23a74ccb8309abbff
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 0.2.1
|
4
|
+
|
5
|
+
* [PR#3](https://github.com/tomasc/simple_form_nested_fields/pull/3) fix duplicate dom classes
|
6
|
+
|
3
7
|
## 0.2.0
|
4
8
|
|
5
9
|
* [PR#1](https://github.com/tomasc/simple_form_nested_fields/pull/1) refactor DOM class names to closely follow the `bem` spec (i.e. `.simple_form_nested_fields__link--add`)
|
data/Gemfile.lock
CHANGED
@@ -19,10 +19,7 @@ module SimpleFormNestedFields
|
|
19
19
|
def_delegators :template, :concat, :content_tag, :hidden_field_tag, :link_to, :render
|
20
20
|
|
21
21
|
def nested_fields_for
|
22
|
-
|
23
|
-
dom_class << bem_class(m: :sortable) if is_sortable?
|
24
|
-
|
25
|
-
content_tag(:div, class: dom_class) do
|
22
|
+
content_tag(:div, class: wrapper_class) do
|
26
23
|
concat nested_fields_title
|
27
24
|
concat nested_fields_items
|
28
25
|
concat nested_fields_links
|
@@ -31,6 +28,11 @@ module SimpleFormNestedFields
|
|
31
28
|
|
32
29
|
private
|
33
30
|
|
31
|
+
def wrapper_class
|
32
|
+
modifiers = is_sortable? ? [record_name, :sortable] : record_name
|
33
|
+
bem_class(m: modifiers)
|
34
|
+
end
|
35
|
+
|
34
36
|
def is_sortable?
|
35
37
|
options[:sortable] == true
|
36
38
|
end
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_nested_fields
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-12-
|
12
|
+
date: 2018-12-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: simple_form
|