Class: CabooseRets::RetsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/caboose_rets/rets_controller.rb

Instance Method Summary collapse

Instance Method Details

#admin_importObject

POST /admin/rets/import



12
13
14
15
16
17
18
19
# File 'app/controllers/caboose_rets/rets_controller.rb', line 12

def admin_import
  return if !user_is_allowed('rets_properties', 'edit')      
  mui = params[:mls]
  CabooseRets::RetsImporter.delay(:priority => 10, :queue => 'rets').import_properties(mui, true)
  resp = Caboose::StdClass.new
  resp.success = "The property is being imported from MLS. This may take a few minutes depending on how many images it has."
  render :json => resp
end

#admin_import_formObject

GET /admin/rets/import



6
7
8
9
# File 'app/controllers/caboose_rets/rets_controller.rb', line 6

def admin_import_form
  return if !user_is_allowed('rets_properties', 'edit')
  render :layout => 'caboose/admin'
end