caboose-rets 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWZlYmU4MzNiMjY1ZWE1Yzk0MTFiNzA4NmE3ZTQ3NDEwNjlmMDEyYw==
4
+ NTgxYWU5ZTgwM2U5YWM4YTc3OGI1ZDUyODQwYjM4ZWE5YzJiMGU5Yg==
5
5
  data.tar.gz: !binary |-
6
- N2NjZWNlNGVlOTg4OTE0N2UyOWZkM2I4MzBmOGFjNWJmYjUxY2U0Yw==
6
+ ZjJkYTZkN2YzZTA1ZDAwY2JiOTE5M2NkYWJiYjZjYTkwMGQ2NDMxNg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YTRkMzJlMTllZjg1ZWZmZTYyY2Y1M2IwNzVjYWVmOGUyYWFkNDUzZGJlZGE4
10
- ZWEwNWQxMDhkMDMyZWJhZTFhZmM2Y2I3ODVkN2I0MDI3ODJjOTJhMjVkMTk1
11
- ZGQ5MmQxMzFiNGI1MDViZGYzYmVhOGRkMjkwNTZhODRiYzc0YzE=
9
+ ZTg2M2I3MmZjODAzM2M0YmQ1YTI1OWZiY2VhM2QwY2RiMzY2MWJlODg5OWI5
10
+ MDFhYzkxMzcwOTY5M2Q5YTQwZjM4MWJlODRmMWJkYzg0ODQwZmZkOTNlNzg1
11
+ Nzc2YjMyMWJmNjBiOWIyOWM4MTY4N2MxMzEyYjUzMjY0MjEyY2Q=
12
12
  data.tar.gz: !binary |-
13
- ZWEyYzY1ZjEyN2I4YWIzNmZiMGM3ZDAxYjMxODI0MmIzMzU2MjNlYzZiOGEx
14
- YTZkNzhhZTYyNDk1MGI0OTI5ODEzOGIwNGEwZjg3MzI0MmM0N2JhM2FmY2Y1
15
- M2I0Y2YwYzkzMmUxNWI3M2NhZGU1ZWNkZjk1ZjFkZTZjNjkwNDI=
13
+ YzkwYjRhN2U4ZmYyZDZmMTU4NGQ2OTEyNzFkNjk3MDU2ZTcxYjZlZWJlZTQ0
14
+ MTQ0MzM0YjJjODlmZGY2YjE3N2I4MDAzMTRhYzc5NTJiNzc3NDlkOTE2NmMx
15
+ ZjgxZTU2YWYwZjFlMzk4ZmZkMTg2OTI5ZWEzYWU4NDIzNjczZWQ=
@@ -7,6 +7,12 @@ class CabooseRets::CommercialProperty < ActiveRecord::Base
7
7
  def office() return CabooseRets::Office.where(:lo_code => self.lo_code).first end
8
8
  def images() return CabooseRets::Media.where(:mls_acct => self.mls_acct).order(:media_order).all end
9
9
 
10
+ def virtual_tour
11
+ return nil if !CabooseRets::Media.exists?("mls_acct = '#{self.mls_acct}' and media_type = 'Virtual Tour'")
12
+ media = CabooseRets::Media.where(:mls_acct => self.mls_acct, :media_type => 'Virtual Tour').first
13
+ return media.url
14
+ end
15
+
10
16
  def self.geolocatable() all(conditions: "latitude IS NOT NULL AND longitude IS NOT NULL") end
11
17
  #def self.property_types() self.pucs("prop_type" ).reject(&:empty?).sort end
12
18
  #def self.statuses() self.pucs("status" ).reject(&:empty?).sort end
@@ -6,6 +6,12 @@ class CabooseRets::LandProperty < ActiveRecord::Base
6
6
  def agent() return CabooseRets::Agent.where(:la_code => self.la_code).first end
7
7
  def office() return CabooseRets::Office.where(:lo_code => self.lo_code).first end
8
8
  def images() return CabooseRets::Media.where(:mls_acct => self.mls_acct).order(:media_order).all end
9
+
10
+ def virtual_tour
11
+ return nil if !CabooseRets::Media.exists?("mls_acct = '#{self.mls_acct}' and media_type = 'Virtual Tour'")
12
+ media = CabooseRets::Media.where(:mls_acct => self.mls_acct, :media_type => 'Virtual Tour').first
13
+ return media.url
14
+ end
9
15
 
10
16
  def self.geolocatable() all(conditions: "latitude IS NOT NULL AND longitude IS NOT NULL") end
11
17
  #def self.property_types() self.unique_field("prop_type" ) end
@@ -6,6 +6,12 @@ class CabooseRets::MultiFamilyProperty < ActiveRecord::Base
6
6
  def agent() return CabooseRets::Agent.where(:la_code => self.la_code).first end
7
7
  def office() return CabooseRets::Office.where(:lo_code => self.lo_code).first end
8
8
  def images() return CabooseRets::Media.where(:mls_acct => self.mls_acct).order(:media_order).all end
9
+
10
+ def virtual_tour
11
+ return nil if !CabooseRets::Media.exists?("mls_acct = '#{self.mls_acct}' and media_type = 'Virtual Tour'")
12
+ media = CabooseRets::Media.where(:mls_acct => self.mls_acct, :media_type => 'Virtual Tour').first
13
+ return media.url
14
+ end
9
15
 
10
16
  def self.geolocatable() all(conditions: "latitude IS NOT NULL AND longitude IS NOT NULL") end
11
17
 
@@ -6,6 +6,12 @@ class CabooseRets::ResidentialProperty < ActiveRecord::Base
6
6
  def agent() return CabooseRets::Agent.where(:la_code => self.la_code).first end
7
7
  def office() return CabooseRets::Office.where(:lo_code => self.lo_code).first end
8
8
  def images() return CabooseRets::Media.where(:mls_acct => self.mls_acct).order(:media_order).all end
9
+
10
+ def virtual_tour
11
+ return nil if !CabooseRets::Media.exists?("mls_acct = '#{self.mls_acct}' and media_type = 'Virtual Tour'")
12
+ media = CabooseRets::Media.where(:mls_acct => self.mls_acct, :media_type => 'Virtual Tour').first
13
+ return media.url
14
+ end
9
15
 
10
16
  def self.geolocatable() all(conditions: "latitude IS NOT NULL AND longitude IS NOT NULL") end
11
17
  #def self.property_types() self.uniq.pluck("prop_type" ).reject(&:empty?).sort end
@@ -1,3 +1,3 @@
1
1
  module CabooseRets
2
- VERSION = '0.0.21'
2
+ VERSION = '0.0.22'
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.0.21
4
+ version: 0.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry