spatial_features 3.4.0 → 3.4.1

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: 60a558353e17d6facde9b9dccccb43022f3c46af98401bf6ad4ceccee6a62b65
4
- data.tar.gz: f2bfcad2b407e9b9329d79650fa3098260524b083b7031caeaa323012fb2fa60
3
+ metadata.gz: 4b15396511a7b6b6d17f4a2181793d9b2a35a3a88ba10b49106c9e43cada84b5
4
+ data.tar.gz: 92c9d1a6b207e1999f63b1e5ab20aec4625b17663e411bcfc7836146c8af4666
5
5
  SHA512:
6
- metadata.gz: 065fa148ffcdd4e221f9aa117117302aa51d805e3b5d0b984d76bae81cd163681a428dec37adf9c51e993065ac93c88c75487545ac353b309ff321b3934a3b62
7
- data.tar.gz: 0ffb13eae72eacdc0a96ec06da6e1e4ee1ffd304f36f80f72fdadebb54269ed8e208b66279c3325217729b36d14727fef03246a989ab5172625fdd3f5694e7fb
6
+ metadata.gz: c15ac3afdd9d23f6e12204a775ad2c8c2777a4c65c494f25560c16db189407a513cd694a71b6d289c81fb4b3872a9621d31da31aaa7bec2830bb233a901ad2d4
7
+ data.tar.gz: c318e7c0897727c41d950451ae7ee65fded8332ded5ec73233660dd8c3285eea571c3160e46eae2b8447131ae8fe0b0559182724719fae3548082ac082e3a3f5
@@ -37,6 +37,10 @@ class AbstractFeature < ActiveRecord::Base
37
37
  end
38
38
  end
39
39
 
40
+ def self.metadata_keys
41
+ unscope(:select, :order, :includes).distinct.pluck('skeys(metadata)')
42
+ end
43
+
40
44
  def self.polygons
41
45
  where(:feature_type => 'polygon')
42
46
  end
@@ -186,7 +186,16 @@ module SpatialFeatures
186
186
  end
187
187
 
188
188
  def features_cache_key
189
- "#{self.class.name}/#{id}-#{has_spatial_features_hash? ? features_hash : (aggregate_feature || features).cache_key}"
189
+ fck =
190
+ if has_spatial_features_hash?
191
+ features_hash
192
+ elsif association(:aggregate_feature).loaded?
193
+ aggregate_feature.cache_key
194
+ else
195
+ aggregate_features.cache_key
196
+ end
197
+
198
+ "#{self.class.name}/#{id}-#{fck}"
190
199
  end
191
200
 
192
201
  def polygons?
@@ -1,3 +1,3 @@
1
1
  module SpatialFeatures
2
- VERSION = "3.4.0"
2
+ VERSION = "3.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spatial_features
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Wallace
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-10-24 00:00:00.000000000 Z
12
+ date: 2023-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails