spatial_features 1.2.2 → 1.2.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/models/feature.rb +8 -0
- 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: 7754cb500b115bf632e28f6dd3a70a390ec07562
|
4
|
+
data.tar.gz: dc35f1c5a3af8eb7c03d71be68da10ba5ea679ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3898e065c71a6f6dc3619a7fa155606364a22f88dc25c9d0ae580a36cbdfe857f7a6427d0896a69770298aeaef6e8604be7fc4b409f68cbe853387da509ed6b2
|
7
|
+
data.tar.gz: eed4263ae1afddd982468ae1aed17b3a1412ea291619310e949c1bed700960e6938aca439e55e7752d023832fb914326cb84c0b968d6703e34cca16435542453
|
@@ -7,6 +7,14 @@ class Feature < ActiveRecord::Base
|
|
7
7
|
validates_inclusion_of :feature_type, :in => ['polygon', 'point', 'line']
|
8
8
|
after_save :cache_derivatives
|
9
9
|
|
10
|
+
def self.with_metadata(k, v)
|
11
|
+
if k.present? && v.present?
|
12
|
+
where('metadata->? = ?', k, v)
|
13
|
+
else
|
14
|
+
all
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
10
18
|
def self.polygons
|
11
19
|
where(:feature_type => 'polygon')
|
12
20
|
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: 1.2.
|
4
|
+
version: 1.2.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: 2015-02-
|
12
|
+
date: 2015-02-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|