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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f2f2795a819de68df6db34518a56fbb050b62231b7e16637298a78ae24085ec
4
- data.tar.gz: c3cbecf44b23bd24108a035c10eb7a0120b4fa002be71ac6a8e48919e21cf6d2
3
+ metadata.gz: 8df9c8e25560022bea552b03fab1871fea63eb9d1bfa45bf7f6aa12b07dde99c
4
+ data.tar.gz: cfb93382429da74063461d711572415c39a3f38b6785929b2354f6088e008b27
5
5
  SHA512:
6
- metadata.gz: 66bca154ec89b92adc201fb1d2d9e0df66c3f150aaaea8babfd305335911f20919a2ba3edfb5854faa8e44ff1914d3dffca9cc450e0d7f90206d9ba07e50f047
7
- data.tar.gz: b04d2224a40991b140a11c15994bc3b8857719224565005e716110d349b6e0767581c7eed459618be08d04f88ce152d9ff1dc9f72660caefd828795dac32b136
6
+ metadata.gz: 05c5cf07813607d7dea64593b5b57d2e0e1f78805cd09e3aed6031862f7a1655f3415e139b17c371a40f4dbaf07f46432702e8dbae779dc793287c2d7e8c0fd0
7
+ data.tar.gz: 4f82b57f9a81cb250f83141acea6e2e97edee1f9a5d47f3987d7177106510abcd40fc0086a4dde2ab162635ca530919eaa492dfa23873a3319e834fa1b7fd3b4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- formify (0.8.0)
4
+ formify (0.9.0)
5
5
  resonad
6
6
 
7
7
  GEM
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.map do |k|
66
- if k.is_a?(String)
67
- k
68
- else
69
- k.try(:id)
70
- end
71
- end.join('/')
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
 
@@ -1,3 +1,3 @@
1
1
  module Formify
2
- VERSION = '0.8.0'.freeze
2
+ VERSION = '0.9.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Jackson