activerecord_to_poro 0.0.6 → 0.0.7

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
  SHA1:
3
- metadata.gz: 8b997c823f571e6337d990f45915271b65bdf283
4
- data.tar.gz: 43abefbf9e2a0aefef0db4a9b4c9198551cc91f5
3
+ metadata.gz: e9dc5c0d0816f712505c234d34541043b596d901
4
+ data.tar.gz: 4b63198258eef3a39ddef742cad138190746c18e
5
5
  SHA512:
6
- metadata.gz: 12924d53f57249f4844e1a96d34ac60b67f5389082a95de2325ce85f02199f5ed3bfa0368ba39a2e7938f22ade7e246bd500916639498f5cd94b4e5187e3da46
7
- data.tar.gz: 884ef768777721768959fa5f5d15270380452f3321b9a52c870158e95fbf4e00bb53f4df298cff3d11e253295e7bcc1c8a17075a33fa679513614e790b024736
6
+ metadata.gz: b4a6489f8984bf31cbdcf37073920f8d7dc7280e4c06248dfc80a943f87ae8cb6ebca579076feb48662ad42ce2791fe39b7b56609cd2514c6bbe81c055895200
7
+ data.tar.gz: 2127a7d11692dbff1d684dfe00cd9586634ac031ca02f164318dcf53e9555f6affb9eaf9b06d7772ce968cee9359e22c90c890327f0184fd2dbce8da57848dbc
@@ -83,7 +83,12 @@ module ActiverecordToPoro
83
83
 
84
84
  def _record_from_metadata!(attrs)
85
85
  specific_metadata = _extract_metadata!(attrs)
86
- _as_scope(specific_metadata.as_scope_hash).first
86
+
87
+ if respond_to?(:query_from_cache) && query_from_cache(specific_metadata.as_scope_hash)
88
+ query_from_cache(specific_metadata.as_scope_hash)
89
+ else
90
+ _as_scope(specific_metadata.as_scope_hash).first
91
+ end
87
92
  end
88
93
  end
89
94
 
@@ -1,3 +1,3 @@
1
1
  module ActiverecordToPoro
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_to_poro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dieter Späth