spatial_features 1.4.8 → 1.4.9

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: 83d7a1f2ccb9d711d6afcd7040a791988aec3598
4
- data.tar.gz: a3622bd27b8450bde182b385879baf135f8b33e5
3
+ metadata.gz: cf3dda9ab1fdf8948a6bab915004ea89a4775b47
4
+ data.tar.gz: 05c63080928e3efad230b01cb4998c05b0b440ff
5
5
  SHA512:
6
- metadata.gz: 5f2ecfb1b6107b69a3818bb2c467412426cc34676a78efdc0adb504e9fc138a973821612b69e2e53bfe15a2206d96f2d87ebb0bf8cf54752283058a52eba56dd
7
- data.tar.gz: 2b6744fb0dab5b44ab070d191d1ca5376f5854ad1d679400e9efbbc13521aab88ccd0a8457a9730c7e8b5c48c9d4fdf0776e6863abb5730b65c5e65150dde484
6
+ metadata.gz: 50badb4ab9d03d94cf50180f67624823cb600a646fcdc0185805dee2e04f2ada1140138131683cc038605b5237751d91450f340698cfdf97c32b024e2f6bed02
7
+ data.tar.gz: 2171f215ae4801d28eb5ca1513aa82558706efa2537a4476555beeaabca921787ead65488671a3c30bf1847d9891dd1eff20c29a4fe0d3b695e65f18991d8408
@@ -6,8 +6,8 @@ module SpatialFeatures
6
6
 
7
7
  has_many :features, lambda { extending FeaturesAssociationExtensions }, :as => :spatial_model, :dependent => :delete_all
8
8
 
9
- scope :with_features, lambda { where(:id => Feature.select(:spatial_model_id).where(:spatial_model_type => name)) }
10
- scope :without_features, lambda { where.not(:id => Feature.select(:spatial_model_id).where(:spatial_model_type => name)) }
9
+ scope :with_features, lambda { joins(:features).uniq }
10
+ scope :without_features, lambda { joins("LEFT OUTER JOIN features ON features.spatial_model_type = '#{name}' AND features.spatial_model_id = #{table_name}.id").where("features.id IS NULL") }
11
11
 
12
12
  has_many :spatial_cache, :as => :spatial_model, :dependent => :delete_all
13
13
  has_many :model_a_spatial_proximities, :as => :model_a, :class_name => 'SpatialProximity', :dependent => :delete_all
@@ -1,3 +1,3 @@
1
1
  module SpatialFeatures
2
- VERSION = "1.4.8"
2
+ VERSION = "1.4.9"
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.4.8
4
+ version: 1.4.9
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-01-22 00:00:00.000000000 Z
12
+ date: 2016-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  requirements: []
119
119
  rubyforge_project:
120
- rubygems_version: 2.4.6
120
+ rubygems_version: 2.4.5.1
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: Adds spatial methods to a model.