spatial_features 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spatial_features/has_spatial_features.rb +6 -2
- data/lib/spatial_features/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f5e50275e49d340e9b3b705079063a296475211
|
4
|
+
data.tar.gz: cdd28aa70864234435fdc1d676d26cec63763e03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20bf2f070aaa4858739d5ca51a65601f08b85c41221b710683a488f221ac76945444532f1d4867b6581b18b230578bd640cf56a75c1ab752a55d45524fbf5d7e
|
7
|
+
data.tar.gz: 462ec7481f45b62159eaaf63886f4f083a73dc5e8c9c5c7c823c1dd4951029ec7dee36710596ce765a56881fe0540d0c866e0d73ac17b4f2533a7886fbf20025
|
@@ -75,7 +75,11 @@ module SpatialFeatures
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def features
|
78
|
-
|
78
|
+
if self.respond_to?(:klass)
|
79
|
+
Feature.where(:spatial_model_type => self.klass, :spatial_model_id => all)
|
80
|
+
else
|
81
|
+
Feature.where(:spatial_model_type => self)
|
82
|
+
end
|
79
83
|
end
|
80
84
|
|
81
85
|
# Returns a scope that includes the features for this record as the table_alias and the features for other as #{table_alias}_other
|
@@ -215,7 +219,7 @@ module SpatialFeatures
|
|
215
219
|
|
216
220
|
module FeaturesAssociationExtensions
|
217
221
|
def area(options = {})
|
218
|
-
if options[:cache] == false
|
222
|
+
if options[:cache] == false || !proxy_association.owner.class.has_features_area?
|
219
223
|
connection.select_value(all.select('ST_Area(ST_UNION(geom))')).try(:to_f)
|
220
224
|
else
|
221
225
|
proxy_association.owner.features_area
|
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: 1.5.
|
4
|
+
version: 1.5.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: 2016-
|
12
|
+
date: 2016-02-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|