caboose-rets 0.1.105 → 0.1.106

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
  SHA256:
3
- metadata.gz: 48edc2bbcfb4c54113811728c9c7bed5710a08739951ee8079ddf36f5d36d319
4
- data.tar.gz: 56e1f5796dbf9cc164bd2fcce891a283f8d4b3968ccbced89863b7c660938827
3
+ metadata.gz: 33e108857d9c9a3c387271a66446780d9a72fdd4bc96222830b88eb39b17f37d
4
+ data.tar.gz: bc4ab43973bcfb910f575755f95aa419361daff621316b4b502ba26db1fcbed1
5
5
  SHA512:
6
- metadata.gz: 7336df1551ab2cbd64dc2a7cc46b0993a7899d97563551a5d31b3003282964e25d4a1ec07b2147702d705f24f54c325e1b8bf390d62366c827c93d38748a7f71
7
- data.tar.gz: 6f0ca4982adac71bff01008c6d5f395520097f49dde89066b2f3f544a7dfc1a8116d6c8bb3c02a19cba1f15d8e21a0ed2e2c7b9b3d94727e595eb9fb8a3e029c
6
+ metadata.gz: 188cb1739bf256712002615cf5d243ddc54cbb462550c4d1551debe6979f0fc490cd97a5c923272572fa71987a6904ffdcf92eec94fb9be257720aa8f00fe85c
7
+ data.tar.gz: 7241b5885953de0f9b08e425e0782cc5110e237cfcee8aa9ed53bea893917cd5aee9fea0a1e69bf011dff684a7e648759bfe91330d4d6286dafe5cf0c093344b
@@ -106,14 +106,7 @@ module CabooseRets
106
106
  beds_min = @property.beds_total - 2 if @property
107
107
  beds_max = @property.beds_total + 2 if @property
108
108
 
109
- # price_min2 = @property.list_price * 0.5 if @property
110
- # price_max2 = @property.list_price * 1.5 if @property
111
- # beds_min2 = @property.beds_total - 3 if @property
112
- # beds_max2 = @property.beds_total + 3 if @property
113
-
114
109
  @related = Property.near("#{@property.latitude}, #{@property.longitude}", 50).where(:property_type => @property.property_type, :status => 'Active', :property_subtype => @property.property_subtype).where(price_where,price_min,price_max).where(beds_where,beds_min,beds_max).where("mls_number != ?",@property.mls_number).order('distance asc').limit(3) if @property
115
- #@related = Property.near("#{@property.latitude}, #{@property.longitude}", 20).where(:property_type => @property.property_type, :status => 'Active', :property_subtype => @property.property_subtype).where(price_where,price_min2,price_max2).where(beds_where,beds_min2,beds_max2).where("mls_number != ?",@property.mls_number).order('distance asc').limit(3) if @property && @related.count == 0
116
-
117
110
 
118
111
  if @property.nil?
119
112
  @mls_number = params[:mls_number]
@@ -117,8 +117,8 @@ class CabooseRets::Property <ActiveRecord::Base
117
117
  self.latitude = self.latitude
118
118
  self.longitude = self.longitude
119
119
  end
120
- self.latitude = nil if self.latitude == '0.0' || self.latitude == 0.0
121
- self.longitude = nil if self.longitude == '0.0' || self.longitude == 0.0
120
+ self.latitude = nil if self.latitude == 0.0
121
+ self.longitude = nil if self.longitude == 0.0
122
122
  # self.landscaping = data['Landscaping']
123
123
  self.laundry = data['LaundryFeatures']
124
124
  self.legal_description = data['TaxLegalDescription']
@@ -429,8 +429,8 @@ class CabooseRets::RetsImporter # < ActiveRecord::Base
429
429
  return
430
430
  end
431
431
 
432
- p.latitude = coords['lat']
433
- p.longitude = coords['lng']
432
+ p.latitude = coords['lat'].to_f
433
+ p.longitude = coords['lng'].to_f
434
434
  p.save
435
435
  end
436
436
 
@@ -1,3 +1,3 @@
1
1
  module CabooseRets
2
- VERSION = '0.1.105'
2
+ VERSION = '0.1.106'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-rets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.105
4
+ version: 0.1.106
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry