caboose-rets 0.0.22 → 0.0.24

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
- NTgxYWU5ZTgwM2U5YWM4YTc3OGI1ZDUyODQwYjM4ZWE5YzJiMGU5Yg==
4
+ YzA4YzA0OGM3N2I2MDlkNmVhZmIyYzc3OGY5NWVkMTFkYzUwOTg1Nw==
5
5
  data.tar.gz: !binary |-
6
- ZjJkYTZkN2YzZTA1ZDAwY2JiOTE5M2NkYWJiYjZjYTkwMGQ2NDMxNg==
6
+ ZTdlN2M4YTMwZWQ5OWUwNzM5ZDEyYmViMDIwZjI0ZjMzYjU1YWI5Mg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZTg2M2I3MmZjODAzM2M0YmQ1YTI1OWZiY2VhM2QwY2RiMzY2MWJlODg5OWI5
10
- MDFhYzkxMzcwOTY5M2Q5YTQwZjM4MWJlODRmMWJkYzg0ODQwZmZkOTNlNzg1
11
- Nzc2YjMyMWJmNjBiOWIyOWM4MTY4N2MxMzEyYjUzMjY0MjEyY2Q=
9
+ MjhhYWQ2MTY4MWIyNWE0NjM5MjI1YWMwYjViNzg5M2Q0ZjQyYjIxYzQ4YjNm
10
+ NTllMDJmMDE5OTQzNzRlOGI0YjFjNzMzNTYwMmU2NGE4ZDkxYjYxOGFjZDc2
11
+ ZWU4MGUyMTJhZjBkNGUwOGFjMmEyMDliY2I4N2E5NGMyMGU0MGM=
12
12
  data.tar.gz: !binary |-
13
- YzkwYjRhN2U4ZmYyZDZmMTU4NGQ2OTEyNzFkNjk3MDU2ZTcxYjZlZWJlZTQ0
14
- MTQ0MzM0YjJjODlmZGY2YjE3N2I4MDAzMTRhYzc5NTJiNzc3NDlkOTE2NmMx
15
- ZjgxZTU2YWYwZjFlMzk4ZmZkMTg2OTI5ZWEzYWU4NDIzNjczZWQ=
13
+ YzA2ZmVjZTdkZTBiOWM0ZDk4NThiNGJkMDA2OGM5MzM4NjRhMWY1YzRhNTFj
14
+ NzMxM2RkNjU5ZjBkNDBkOGVlYjViZDI5ZTYxMGM4ZWRiYTdjNjUxOTIwYzll
15
+ MDFkYzliOTgxYTIyNjAzYTRjYjNhY2U1M2RiOTVkOWRjMTBkYmE=
@@ -7,9 +7,9 @@ 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
10
+ def virtual_tour
11
+ return nil if !CabooseRets::Media.where(:mls_acct => self.mls_acct.to_s).where(:media_type => 'Virtual Tour').exists?
12
+ media = CabooseRets::Media.where(:mls_acct => self.mls_acct.to_s, :media_type => 'Virtual Tour').first
13
13
  return media.url
14
14
  end
15
15
 
@@ -7,9 +7,9 @@ class CabooseRets::LandProperty < 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
10
+ def virtual_tour
11
+ return nil if !CabooseRets::Media.where(:mls_acct => self.mls_acct.to_s).where(:media_type => 'Virtual Tour').exists?
12
+ media = CabooseRets::Media.where(:mls_acct => self.mls_acct.to_s, :media_type => 'Virtual Tour').first
13
13
  return media.url
14
14
  end
15
15
 
@@ -7,9 +7,9 @@ class CabooseRets::MultiFamilyProperty < 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
10
+ def virtual_tour
11
+ return nil if !CabooseRets::Media.where(:mls_acct => self.mls_acct.to_s).where(:media_type => 'Virtual Tour').exists?
12
+ media = CabooseRets::Media.where(:mls_acct => self.mls_acct.to_s, :media_type => 'Virtual Tour').first
13
13
  return media.url
14
14
  end
15
15
 
@@ -7,9 +7,9 @@ class CabooseRets::ResidentialProperty < 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
10
+ def virtual_tour
11
+ return nil if !CabooseRets::Media.where(:mls_acct => self.mls_acct.to_s).where(:media_type => 'Virtual Tour').exists?
12
+ media = CabooseRets::Media.where(:mls_acct => self.mls_acct.to_s, :media_type => 'Virtual Tour').first
13
13
  return media.url
14
14
  end
15
15
 
@@ -1,3 +1,3 @@
1
1
  module CabooseRets
2
- VERSION = '0.0.22'
2
+ VERSION = '0.0.24'
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.22
4
+ version: 0.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry