smooth_operator 1.30.0 → 1.30.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzBkMzFiOTQ5ODg4Mzg0NmZmMzUzM2NiOWIxMjM2ZmZkOWZkZTM3OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGNjMTJjMDNhZjU3NDE4ZGRlYTdjNzQzYjRhMWYyZDBkMmY1NzEyNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmUxOGQyZjIyYmM5OWQ4M2NmYmEzMWE1MGM5ODIwMTEyMzQ2N2M4NDcyZjg4
|
10
|
+
ODhhZTAzMjFlZjcyMWE3YmVjMDM5NThlODUyYjdhM2NlMGRmOGY5ZDQwNWQx
|
11
|
+
Yzc5OGY3MzE0YjRjMTJlNzIwZWM2MzVlMDg5ZWI2YzA5MzBjMjg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDczNTYxMzZhZDFjMmMzYjRiZDVkNDgzYzFkZjEzYzAwNzgyZjkzYzhhNWRh
|
14
|
+
NmQyZGI4N2FjOTAyMjhkMDAxZTcyZGYzZmYzYWMzMDc5YzU4MzNiOTI5MWU1
|
15
|
+
NmJlODNlYTIxMDQyNjFlYzBmYWYyYjAxZjcxNGMzNTNiMDBiMjA=
|
@@ -17,13 +17,19 @@ module SmoothOperator
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def build(attributes = {})
|
20
|
-
|
20
|
+
new_entries = if attributes.is_a?(Array)
|
21
|
+
attributes.map { |attrs| new(attrs) }
|
22
|
+
else
|
23
|
+
[new(attributes)]
|
24
|
+
end
|
21
25
|
|
22
|
-
new_array
|
26
|
+
new_array = get_array
|
27
|
+
|
28
|
+
new_array.push *new_entries
|
23
29
|
|
24
30
|
object.send("#{association}=", new_array)
|
25
31
|
|
26
|
-
|
32
|
+
attributes.is_a?(Array) ? new_entries : new_entries.first
|
27
33
|
end
|
28
34
|
|
29
35
|
undef :is_a?
|
@@ -19,12 +19,8 @@ module SmoothOperator
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
def model_name=(name)
|
23
|
-
@custom_model_name = name
|
24
|
-
end
|
25
|
-
|
26
22
|
def custom_model_name
|
27
|
-
|
23
|
+
get_option :model_name, nil
|
28
24
|
end
|
29
25
|
|
30
26
|
protected ############## PROTECTED #############
|