formify 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/formify/form.rb +11 -7
- data/lib/formify/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8df9c8e25560022bea552b03fab1871fea63eb9d1bfa45bf7f6aa12b07dde99c
|
4
|
+
data.tar.gz: cfb93382429da74063461d711572415c39a3f38b6785929b2354f6088e008b27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05c5cf07813607d7dea64593b5b57d2e0e1f78805cd09e3aed6031862f7a1655f3415e139b17c371a40f4dbaf07f46432702e8dbae779dc793287c2d7e8c0fd0
|
7
|
+
data.tar.gz: 4f82b57f9a81cb250f83141acea6e2e97edee1f9a5d47f3987d7177106510abcd40fc0086a4dde2ab162635ca530919eaa492dfa23873a3319e834fa1b7fd3b4
|
data/Gemfile.lock
CHANGED
data/lib/formify/form.rb
CHANGED
@@ -62,13 +62,17 @@ module Formify
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def with_advisory_lock(*keys, **args)
|
65
|
-
key = keys.
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
65
|
+
key = if keys.present?
|
66
|
+
keys.map do |k|
|
67
|
+
if k.is_a?(String)
|
68
|
+
k
|
69
|
+
else
|
70
|
+
k.try(:id)
|
71
|
+
end
|
72
|
+
end.join('/')
|
73
|
+
else
|
74
|
+
self.class.name.underscore
|
75
|
+
end
|
72
76
|
ActiveRecord::Base.with_advisory_lock(key, **args) { yield }
|
73
77
|
end
|
74
78
|
|
data/lib/formify/version.rb
CHANGED