spatial_features 2.17.0 → 2.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/abstract_feature.rb +4 -5
- data/lib/spatial_features/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b61f238cf2d0fa0dd936d9258c617708ea7e4e4ec4be41257b0a3869cde54d4d
|
4
|
+
data.tar.gz: 5ea8025d332dd1fedeab4a90c878568567710d139eba76547cf695e0bbedfd66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8089ccc6e35bf54547f72d11332d3112388ba86ba2dd4828080f7be12a075ab3f33c3d181d79dd7c4403bfd7d9c2e8d6ff7842d57dcfc6ad2a775361d1ce5844
|
7
|
+
data.tar.gz: 6ae887ec028239d8d0431ecdbf2006f0f5b7a8ecf04e3c1b45adadd5a080a44b2b447787e178614610f1627a5cfe244cfee2fabd9670fa617deb516a87813512
|
@@ -19,17 +19,16 @@ class AbstractFeature < ActiveRecord::Base
|
|
19
19
|
before_save :sanitize, if: :will_save_change_to_geog?
|
20
20
|
after_save :cache_derivatives, :if => [:automatically_cache_derivatives?, :saved_change_to_geog?]
|
21
21
|
|
22
|
-
def self.cache_key
|
23
|
-
result = connection.select_one(all.select('max(id) AS max, count(*) AS count').to_sql)
|
24
|
-
"#{result['max']}-#{result['count']}"
|
25
|
-
end
|
26
|
-
|
27
22
|
# for Rails >= 5 ActiveRecord collections we override the collection_cache_key
|
28
23
|
# to prevent Rails doing its default query on `updated_at`
|
29
24
|
def self.collection_cache_key(_collection, _timestamp_column)
|
30
25
|
self.cache_key
|
31
26
|
end
|
32
27
|
|
28
|
+
def self.cache_key
|
29
|
+
"#{maximum(:id)}-#{count}"
|
30
|
+
end
|
31
|
+
|
33
32
|
def self.with_metadata(k, v)
|
34
33
|
if k.present? && v.present?
|
35
34
|
where('metadata->? = ?', k, v)
|
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: 2.17.
|
4
|
+
version: 2.17.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: 2021-
|
12
|
+
date: 2021-09-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|