Module: CabooseRets

Defined in:
lib/caboose-rets.rb,
lib/caboose_rets/engine.rb,
lib/caboose_rets/version.rb,
app/helpers/caboose_rets/application_helper.rb,
app/controllers/caboose_rets/rets_controller.rb,
app/controllers/caboose_rets/agents_controller.rb,
app/controllers/caboose_rets/offices_controller.rb,
app/controllers/caboose_rets/properties_controller.rb,
app/controllers/caboose_rets/rets_media_controller.rb,
app/controllers/caboose_rets/application_controller.rb,
app/controllers/caboose_rets/open_houses_controller.rb,
app/controllers/caboose_rets/saved_searches_controller.rb,
app/controllers/caboose_rets/saved_properties_controller.rb

Defined Under Namespace

Modules: ApplicationHelper Classes: Agent, AgentMeta, AgentsController, ApplicationController, Engine, Log, Media, Office, OfficeMeta, OfficesController, OpenHouse, OpenHousesController, PropertiesController, Property, RetsConfig, RetsController, RetsImporter, RetsMailer, RetsMediaController, RetsPlugin, SavedPropertiesController, SavedProperty, SavedSearch, SavedSearchesController, Schema, SearchOption

Constant Summary collapse

VERSION =
'0.1.175'
@@default_property_sort =
'current_price DESC, mls'
@@use_hosted_images =
true
@@media_base_url =
''
@@agents_base_url =
''
@@offices_base_url =
''
@@timezone =
'Central Time (US & Canada)'

Class Method Summary collapse

Class Method Details

.get_property(mls) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/caboose_rets/engine.rb', line 5

def CabooseRets.get_property(mls)
  return nil if mls.nil?
  models = [
    CabooseRets::ResidentialProperty, 
    CabooseRets::CommercialProperty, 
    CabooseRets::LandProperty, 
    CabooseRets::MultiFamilyProperty
  ]
  models.each do |model|
    return model.find(mls.to_i) if model.exists?(mls.to_i)            
  end
  return nil
end