mls 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mls/account.rb +5 -0
- data/lib/mls/comment.rb +6 -0
- data/lib/mls/email.rb +8 -0
- data/lib/mls/lead_listing.rb +2 -0
- data/lib/mls/listing.rb +1 -2
- data/lib/mls/property.rb +2 -2
- data/lib/mls.rb +7 -5
- data/mls.gemspec +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 394774786bfa36695f06cbc1629564bb3383a502
|
4
|
+
data.tar.gz: dcb908d31bea54620d9b2d225b5c1034032f039c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed460f3af42891c93935da8f8ec1aff84abd83b360b46f808b663f27429a38ad7eee636f9ad637d49092f56da729623b6be7a065a4728031205d3ede59e65a06
|
7
|
+
data.tar.gz: 2de742f1e7d57b0e200526e53940597b73eda2ab68da98cb106c7ae6002794a2f77bf3f086f7c159d8a2d5f3ddc64c4dc9e5a7f62330e439e9d6299b510fce6a
|
data/lib/mls/account.rb
CHANGED
data/lib/mls/comment.rb
ADDED
data/lib/mls/email.rb
ADDED
data/lib/mls/lead_listing.rb
CHANGED
data/lib/mls/listing.rb
CHANGED
@@ -4,7 +4,6 @@ class Listing < MLS::Model
|
|
4
4
|
include MLS::Slugger
|
5
5
|
include MLS::Avatar
|
6
6
|
|
7
|
-
STATES = %w(processing visible invisible off_market expired)
|
8
7
|
LEASE_STATES = %w(listed leased)
|
9
8
|
SPACE_TYPES = %w(unit floor building)
|
10
9
|
TYPES = %w(Sale Lease Sublease CoworkingSpace)
|
@@ -28,7 +27,7 @@ class Listing < MLS::Model
|
|
28
27
|
has_many :photos, -> { order('photos.order ASC') }, :as => :subject, :inverse_of => :subject
|
29
28
|
|
30
29
|
has_many :agencies, -> { order(:order) }, :as => :subject
|
31
|
-
has_many :agents, :through => :agencies, :source => :agent
|
30
|
+
has_many :agents, -> { order('agencies.order') }, :through => :agencies, :source => :agent
|
32
31
|
|
33
32
|
has_one :address
|
34
33
|
has_many :addresses
|
data/lib/mls/property.rb
CHANGED
@@ -15,8 +15,8 @@ class Property < MLS::Model
|
|
15
15
|
has_one :address, -> { where(:primary => true) }
|
16
16
|
|
17
17
|
def default_contact
|
18
|
-
@default_contact ||= listings.where(lease_state: :listed,
|
19
|
-
.where({ type: ['Lease', 'Sublease'
|
18
|
+
@default_contact ||= listings.where(lease_state: :listed, ghost: false, authorized: true)
|
19
|
+
.where({ type: ['Lease', 'Sublease']})
|
20
20
|
.order(size: :desc)
|
21
21
|
.first.try(:contact)
|
22
22
|
end
|
data/lib/mls.rb
CHANGED
@@ -30,7 +30,7 @@ module MLS
|
|
30
30
|
ensure
|
31
31
|
Thread.current[:sunstone_cookie_store] = nil
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
end
|
35
35
|
|
36
36
|
class MLS::Model < ActiveRecord::Base
|
@@ -38,11 +38,11 @@ class MLS::Model < ActiveRecord::Base
|
|
38
38
|
end
|
39
39
|
|
40
40
|
module MLS::Slugger
|
41
|
-
|
41
|
+
|
42
42
|
extend ActiveSupport::Concern
|
43
|
-
|
43
|
+
|
44
44
|
module ClassMethods
|
45
|
-
|
45
|
+
|
46
46
|
def find(*args)
|
47
47
|
friendly = -> (arg) { arg.respond_to?(:to_i) && arg.to_i.to_s != arg.to_s }
|
48
48
|
|
@@ -54,7 +54,7 @@ module MLS::Slugger
|
|
54
54
|
end
|
55
55
|
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
def to_param
|
59
59
|
slug
|
60
60
|
end
|
@@ -88,6 +88,7 @@ end
|
|
88
88
|
|
89
89
|
require 'mls/photo'
|
90
90
|
require 'mls/account'
|
91
|
+
require 'mls/email'
|
91
92
|
require 'mls/organization'
|
92
93
|
require 'mls/property'
|
93
94
|
require 'mls/region'
|
@@ -104,6 +105,7 @@ require 'mls/agency'
|
|
104
105
|
require 'mls/session'
|
105
106
|
require 'mls/floorplan'
|
106
107
|
require 'mls/use'
|
108
|
+
require 'mls/comment'
|
107
109
|
|
108
110
|
# Models
|
109
111
|
# # Helpers
|
data/mls.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "mls"
|
6
|
-
s.version = '1.
|
6
|
+
s.version = '1.3.0'
|
7
7
|
s.authors = ["Jon Bracy", "James R. Bracy"]
|
8
8
|
s.email = ["jon@42floors.com", "james@42floors.com"]
|
9
9
|
s.homepage = "http://mls.42floors.com"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Bracy
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-11-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -195,6 +195,8 @@ files:
|
|
195
195
|
- lib/mls/account.rb
|
196
196
|
- lib/mls/address.rb
|
197
197
|
- lib/mls/agency.rb
|
198
|
+
- lib/mls/comment.rb
|
199
|
+
- lib/mls/email.rb
|
198
200
|
- lib/mls/floorplan.rb
|
199
201
|
- lib/mls/flyer.rb
|
200
202
|
- lib/mls/inquiry.rb
|