standard_procedure_fabrik 0.1.1 → 0.1.2
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/checksums/standard_procedure_fabrik-0.1.2.gem.sha512 +1 -0
- data/lib/fabrik/database.rb +4 -1
- data/lib/fabrik/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2742aab097f1a8977498b4b654829b4a6b9d54e98320a4e56a2c1419aeeb53ad
|
4
|
+
data.tar.gz: 34394ab7faa6707a2afcd4fa03d24fedc5ae84471c0f461b37ac70de5ef51ca5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c049dacfdaa1a044e70510216f244d3008e441f3cf950439e7862c7ed165a915e0f6b42787a3afdcca4d50be3bfd1408668308c6cab176196ffc26cad5053481
|
7
|
+
data.tar.gz: e814649e75c6cd9ea0a69d6705205b62ef91bc34b4bf545d093c616924bebe2ee84bfea09df4d0298dc294c759d44c7f4fdb7f6ee752c2a9b568e0dd7bcbdb04
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
939adbdd3a1922e7dc52f5125c9511bc6eb0bdc77cde5a54464b7f56506b6bf309828aac8df062d0ac8da29bcce5a0ee66affc56b20c0112df52aaa0764f736b
|
data/lib/fabrik/database.rb
CHANGED
@@ -91,7 +91,10 @@ module Fabrik
|
|
91
91
|
|
92
92
|
private def default_attributes = @blueprint.default_attributes
|
93
93
|
|
94
|
-
private def find_or_create_record(attributes)
|
94
|
+
private def find_or_create_record(attributes)
|
95
|
+
attributes = attributes_with_defaults(attributes)
|
96
|
+
find_record(attributes) || create_record(attributes)
|
97
|
+
end
|
95
98
|
|
96
99
|
private def find_record(attributes) = attributes.slice(*search_keys).empty? ? nil : klass.find_by(**attributes.slice(*search_keys))
|
97
100
|
|
data/lib/fabrik/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: standard_procedure_fabrik
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rahoul Baruah
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- Rakefile
|
54
54
|
- checksums/standard_procedure_fabrik-0.1.0.gem.sha512
|
55
55
|
- checksums/standard_procedure_fabrik-0.1.1.gem.sha512
|
56
|
+
- checksums/standard_procedure_fabrik-0.1.2.gem.sha512
|
56
57
|
- lib/fabrik.rb
|
57
58
|
- lib/fabrik/database.rb
|
58
59
|
- lib/fabrik/version.rb
|