Sha256: 2a04cecedd0a7cfe5fa6da60be6eab829f18dd527cda47c45fc5286712658838

Contents?: true

Size: 698 Bytes

Versions: 7

Compression:

Stored size: 698 Bytes

Contents

module CabooseRets
  class RetsController < ApplicationController
    
    # GET /admin/rets/import
    def admin_import_form
      return if !user_is_allowed('properties', 'edit')
      render :layout => 'caboose/admin'
    end
      
    # POST /admin/rets/import
    def admin_import
      return if !user_is_allowed('properties', 'edit')
                  
      mls_acct = params[:mls_acct].to_i            
      ResidentialProperty.delay.import_from_mls(mls_acct)        
      
      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

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
caboose-rets-0.0.52 app/controllers/caboose_rets/rets_controller.rb
caboose-rets-0.0.51 app/controllers/caboose_rets/rets_controller.rb
caboose-rets-0.0.50 app/controllers/caboose_rets/rets_controller.rb
caboose-rets-0.0.49 app/controllers/caboose_rets/rets_controller.rb
caboose-rets-0.0.48 app/controllers/caboose_rets/rets_controller.rb
caboose-rets-0.0.47 app/controllers/caboose_rets/rets_controller.rb
caboose-rets-0.0.46 app/controllers/caboose_rets/rets_controller.rb