spatial_features 2.5.1 → 2.5.2
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/lib/spatial_features/has_spatial_features.rb +4 -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: 6546da69d43dd7c33cc9b19158b3d3c9f470a408
|
|
4
|
+
data.tar.gz: 6d4c6fed9cf11d5e9ab969731f191da542b684b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ded67ca6baf54207080e00c3c14887952a285d31b5a7c28af1a9c552be0a6706833ac809aa2719d76d276313eb70c9ff2a1fb0f95ce964110b65b85a95d4f69
|
|
7
|
+
data.tar.gz: 17edbcf806c5acdff92150dd1990f6c37b0ba1705050c55721d29dda7fb1d58edcbf70b7a71a8ba02288f8604018dc390ef8c29b63265c551a7d1f601ce11922
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# TODO: Test the `::features` on a subclass to ensure we scope correctly
|
|
1
2
|
module SpatialFeatures
|
|
2
3
|
module ActMethod
|
|
3
4
|
def has_spatial_features(options = {})
|
|
@@ -71,10 +72,11 @@ module SpatialFeatures
|
|
|
71
72
|
end
|
|
72
73
|
|
|
73
74
|
def features
|
|
75
|
+
type = base_class # Rails stores polymorphic foreign keys as the base class
|
|
74
76
|
if all == unscoped
|
|
75
|
-
Feature.where(:spatial_model_type =>
|
|
77
|
+
Feature.where(:spatial_model_type => type)
|
|
76
78
|
else
|
|
77
|
-
Feature.where(:spatial_model_type =>
|
|
79
|
+
Feature.where(:spatial_model_type => type, :spatial_model_id => all.unscope(:select))
|
|
78
80
|
end
|
|
79
81
|
end
|
|
80
82
|
|
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.5.
|
|
4
|
+
version: 2.5.2
|
|
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: 2018-03-21 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|