spatial_features 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6cd096776f5bb77163b8212f69c6adb72e18eebe
4
- data.tar.gz: 4e231bdbbdfb67a8eeb6834723813668d3680389
3
+ metadata.gz: 3398bdc7fdd768d31153afe3f6e37578d69bec7f
4
+ data.tar.gz: f4b1ef3cde4089d05d59688fa74b1f300a30495f
5
5
  SHA512:
6
- metadata.gz: 691b52de13ba3bb0dcb984f5b8c13da76aa7f5c3f6022da16b5c2213c942dc5945c0f78ec3e274a7c20ba5ad2aa22effebbe640f69d084a58b9861071fa31ba3
7
- data.tar.gz: fb09b3e7c0de8d60deeb2f5fe726b5628f8e052623c6d57a5ec9ad3a29fde465207e3a021218b7bd8ccb2bb593bd872223771ab6bb1213248523eee6fa10e4bb
6
+ metadata.gz: 063a5c623ddcb17727a9036c7a7f1221e812fd039c872952ddfbb8aa2372f1b39d9c77caafd97aec63882f5f505e83eb33b158060865d61f2cc104064ed98c07
7
+ data.tar.gz: 95655407c3a5305f4652237de67a9edb6aeb0edc18efae3e85aa0e87a01e57ddd581a3edc5876904639ba5d8c0a805b750b185e013e7bd7b3e89ba0e1265d635
@@ -75,7 +75,12 @@ module SpatialFeatures
75
75
  end
76
76
 
77
77
  def features
78
- Feature.where(:spatial_model_type => self, :spatial_model_id => all)
78
+ case self
79
+ when ActiveRecord::Base
80
+ Feature.where(:spatial_model_type => self)
81
+ else
82
+ Feature.where(:spatial_model_type => self, :spatial_model_id => all)
83
+ end
79
84
  end
80
85
 
81
86
  # Returns a scope that includes the features for this record as the table_alias and the features for other as #{table_alias}_other
@@ -1,3 +1,3 @@
1
1
  module SpatialFeatures
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.1"
3
3
  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.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Wallace