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 +8 -8
- data/app/models/caboose_rets/commercial_property.rb +6 -0
- data/app/models/caboose_rets/land_property.rb +6 -0
- data/app/models/caboose_rets/multi_family_property.rb +6 -0
- data/app/models/caboose_rets/residential_property.rb +6 -0
- data/lib/caboose_rets/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTgxYWU5ZTgwM2U5YWM4YTc3OGI1ZDUyODQwYjM4ZWE5YzJiMGU5Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjJkYTZkN2YzZTA1ZDAwY2JiOTE5M2NkYWJiYjZjYTkwMGQ2NDMxNg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTg2M2I3MmZjODAzM2M0YmQ1YTI1OWZiY2VhM2QwY2RiMzY2MWJlODg5OWI5
|
10
|
+
MDFhYzkxMzcwOTY5M2Q5YTQwZjM4MWJlODRmMWJkYzg0ODQwZmZkOTNlNzg1
|
11
|
+
Nzc2YjMyMWJmNjBiOWIyOWM4MTY4N2MxMzEyYjUzMjY0MjEyY2Q=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
data/lib/caboose_rets/version.rb
CHANGED