spatial_features 2.9.2 → 2.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/abstract_feature.rb +9 -1
- data/app/models/feature.rb +1 -1
- data/lib/spatial_features/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 060dca976eac8a7cbff438221861b8b60cf559d5c8edae033bf1cd35f1b1ed84
|
4
|
+
data.tar.gz: ca965a8dbaa21d63f4c226517a7229d573ceec923e97a03b0906da028605b4c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2deace5489bb06708d816d16673bd23b2259b604bc592f7c33e6e29eb1055a1ba6992e11312148f76bb885d20c449a35a8ee0be5c0ff9d3725d0d68ebecec633
|
7
|
+
data.tar.gz: 1738c4c0665b974aff7ebbf3774d031e444d64a2362f32ede6baae7ca8e7afef47a2c247b8dabf82e1adfabce975138e06bb4e52156344030526c30246180335
|
@@ -14,7 +14,7 @@ class AbstractFeature < ActiveRecord::Base
|
|
14
14
|
validates_presence_of :geog
|
15
15
|
validate :validate_geometry
|
16
16
|
before_save :sanitize
|
17
|
-
after_save :cache_derivatives
|
17
|
+
after_save :cache_derivatives, :if => :saved_change_to_geog?
|
18
18
|
|
19
19
|
def self.cache_key
|
20
20
|
"#{maximum(:id)}-#{count}"
|
@@ -189,4 +189,12 @@ class AbstractFeature < ActiveRecord::Base
|
|
189
189
|
def sanitize_input_for_sql(input)
|
190
190
|
self.class.send(:sanitize_sql_for_conditions, input)
|
191
191
|
end
|
192
|
+
|
193
|
+
def saved_change_to_geog?
|
194
|
+
if Rails.version >= '5.1'
|
195
|
+
super
|
196
|
+
else
|
197
|
+
geog_changed?
|
198
|
+
end
|
199
|
+
end
|
192
200
|
end
|
data/app/models/feature.rb
CHANGED
@@ -47,7 +47,7 @@ class Feature < AbstractFeature
|
|
47
47
|
# Check if there is a spatial model id because nothing prevents is from creating a Feature without one. Depending on
|
48
48
|
# how you assign a feature to a record, you may end up saving it before assigning it to a record, thereby leaving
|
49
49
|
# this field blank.
|
50
|
-
spatial_model_id? && automatically_refresh_aggregate
|
50
|
+
spatial_model_id? && automatically_refresh_aggregate && saved_change_to_geog?
|
51
51
|
end
|
52
52
|
|
53
53
|
# Features are used for display so we also cache their KML representation
|
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.9.
|
4
|
+
version: 2.9.3
|
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:
|
12
|
+
date: 2020-01-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -220,7 +220,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
220
|
- !ruby/object:Gem::Version
|
221
221
|
version: '0'
|
222
222
|
requirements: []
|
223
|
-
|
223
|
+
rubyforge_project:
|
224
|
+
rubygems_version: 2.7.9
|
224
225
|
signing_key:
|
225
226
|
specification_version: 4
|
226
227
|
summary: Adds spatial methods to a model.
|