Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow errors to return through MLS API when bad tour request is submi…

…tted
  • Loading branch information...
commit 2b0b214effac3cacfc0c02337098b2ebcf13d42e 1 parent 85b3394
@darrennix darrennix authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/mls/models/listing.rb
View
5 lib/mls/models/listing.rb
@@ -133,9 +133,8 @@ def space_name
# listing.request_tour('', 'emai', info) # => #<MLS::TourRequest> will have errors on account
def request_tour(account, tour={})
params = {:account => account, :tour => tour}
- MLS.post("/listings/#{id}/tour_requests", params, 400) do |response, code|
- return MLS::TourRequest::Parser.parse(response.body)
- end
+ response = MLS.post("/listings/#{id}/tour_requests", params)
+ return MLS::TourRequest::Parser.parse(response.body)
end
Please sign in to comment.
Something went wrong with that request. Please try again.