caboose-rets 0.1.168 → 0.1.169

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: 85653f2bfcadd1d7fe60ccbc72c44e29b507ddf8b7e2ca711d7c2d7c9facb255
4
- data.tar.gz: 270f490ae2fa77a1973ea18f1f1491369dbee8ad093151710644762a39c35c3e
3
+ metadata.gz: cfcd614cf28fd3ed0edff6c61880fbf14d40e84c6170cea36db9bd383247e633
4
+ data.tar.gz: 10d153852b2ffab78fdda69dcc9394e4ae7d4347b8c3a74a964cc9bddfc702b4
5
5
  SHA512:
6
- metadata.gz: 79d76f9992f5539ee453214c9832f5c194b2de9c91f76209de155b6a60c548ff24cdd772380e03cc52531b6ca0212d0515d45fff713c34fe0d5a8939a6250680
7
- data.tar.gz: 805993e693ca53874f547e004046049ddda5f07269a1f270efd199a8a1858df66dd8787361c85e1e0db62a139e61063b9fb3f105460c53518e3979ed963a25b5
6
+ metadata.gz: b63d94a24059dd9a53163371064388dcb2ed45f3807da1b60fb323a94da63cb105191815d95ca3c25ad67491c327fc90c6c5883cf99a5685d3314c35ae77a9da
7
+ data.tar.gz: 2d50bcce74ecdc06f4bcdacd03fd2d8b53727f846e03d0005e0bff4132b2519c2eec8f88a52f249d07690031584830f5dbe971f728c7886c7ec245e8546852bb
@@ -1,4 +1,3 @@
1
-
2
1
  module CabooseRets
3
2
  class PropertiesController < ApplicationController
4
3
 
@@ -22,7 +21,11 @@ module CabooseRets
22
21
  params[:street_name_like][0] = '' if params[:street_name_like][0].to_i == 0
23
22
  end
24
23
  end
25
- where = @site && @site.id == 558 ? "(style ILIKE '%condo%' OR res_style ILIKE '%condo%' OR property_subtype ILIKE '%condo%' OR property_subtype ILIKE '%townhouse%')" : "(id is not null)"
24
+ where = "(id is not null)"
25
+ if (@site && @site.id == 558) || request.original_fullpath =~ /^\/tuscaloosa-condos-for-sale(.*?)$/
26
+ where = "(style ILIKE '%condo%' OR res_style ILIKE '%condo%' OR property_subtype ILIKE '%condo%' OR property_subtype ILIKE '%townhouse%')"
27
+ end
28
+ # where = @site && @site.id == 558 ? "(style ILIKE '%condo%' OR res_style ILIKE '%condo%' OR property_subtype ILIKE '%condo%' OR property_subtype ILIKE '%townhouse%')" : "(id is not null)"
26
29
  sortby = @site && @site.id == 558 ? "original_entry_timestamp" : CabooseRets::default_property_sort
27
30
  @saved_properties = CabooseRets::SavedProperty.where(:user_id => logged_in_user.id).pluck(:mls_number)
28
31
  @pager = Caboose::PageBarGenerator.new(params, {
@@ -82,10 +85,10 @@ module CabooseRets
82
85
  # if params[:ftr_lotdesc] == 'golf' then @properties.reject!{|p| p.ftr_lotdesc != 'golf'} end
83
86
  if params[:foreclosure_yn] then @properties.reject!{|p| p.foreclosure_yn != "Y"} end
84
87
 
85
- @saved_search = nil
86
- if CabooseRets::SavedSearch.exists?(:uri => request.fullpath)
87
- @saved_search = CabooseRets::SavedSearch.where(:uri => request.fullpath).first
88
- end
88
+ # @saved_search = nil
89
+ # if CabooseRets::SavedSearch.exists?(:uri => request.fullpath)
90
+ # @saved_search = CabooseRets::SavedSearch.where(:uri => request.fullpath).first
91
+ # end
89
92
 
90
93
  @block_options = {
91
94
  :properties => @properties,
@@ -161,7 +161,7 @@ class CabooseRets::Property <ActiveRecord::Base
161
161
  self.matrix_unique_id = data['ListingKey']
162
162
  self.matrix_modified_dt = data['ModificationTimestamp']
163
163
  self.max_sqft = data['LivingArea']
164
- self.middle_school = data['MiddleSchool']
164
+ self.middle_school = data['MiddleOrJuniorSchool']
165
165
  # self.mineral_rights = data['MineralRights']
166
166
  self.min_sqft = data['LivingArea']
167
167
  self.misc_indoor_featuresa = data['BuildingFeatures']
@@ -1,5 +1,4 @@
1
1
  domain = Caboose::Domain.where(:site_id => @site.id, :primary => true).first.domain
2
- hp = Caboose::Page.where(:site_id => @site.id, :title => "Home").first
3
2
  xml.instruct! :xml, :version => "1.0"
4
3
  xml.listings do
5
4
  xml.title @site.id == 558 ? "The Gray Group" : @site.description
@@ -39,7 +38,8 @@ xml.instruct! :xml, :version => "1.0"
39
38
  elsif !property.alternate_link.blank? && @use_alternate_link == true
40
39
  xml.url(property.alternate_link)
41
40
  else
42
- xml.url("https://" + domain + "/properties/#{property.mls_number}/details?utm_source=Nine&utm_medium=Facebook&utm_campaign=Retargeting")
41
+ url = "https://" + domain + "/properties/#{property.mls_number}/details?utm_source=Nine&utm_medium=Facebook&utm_campaign=Retargeting"
42
+ xml.url( url )
43
43
  end
44
44
  xml.year_built(property.year_built)
45
45
  if !property.property_type.blank?
@@ -12,7 +12,7 @@ xml.rss :version => "2.0", "xmlns:g" => "http://base.google.com/ns/1.0" do
12
12
  xml.g(:id, property.mls_number)
13
13
  xml.g(:title, property.full_address)
14
14
  xml.g(:description, property.public_remarks)
15
- xml.g(:link, "https://" + domain + "/properties/#{property.mls_number}/details?utm_source=Nine&utm_medium=Facebook&utm_campaign=Retargeting")
15
+ xml.g(:link, "https://" + domain + "/properties/#{property.mls_number}/details")
16
16
  first_image = property.images.first if property.images
17
17
  m = Caboose::Media.where(:id => first_image.media_id).first if first_image && !first_image.media_id.blank?
18
18
  if m && m.image
@@ -1,3 +1,3 @@
1
1
  module CabooseRets
2
- VERSION = '0.1.168'
2
+ VERSION = '0.1.169'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-rets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.168
4
+ version: 0.1.169
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-23 00:00:00.000000000 Z
11
+ date: 2020-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: caboose-cms