Sha256: 827fb5de2812235ed86031ef5fab6b3baa9d644b17ef1449ff0a9b6f632908ee

Contents?: true

Size: 560 Bytes

Versions: 181

Compression:

Stored size: 560 Bytes

Contents

require_dependency "educode_sales/application_controller"

module EducodeSales
  class CustomerExtensionsController < ApplicationController

    def create
      params[:school_ids].each do |d|
        if EducodeSales::CustomerExtension.find_by(school_id: d).present?
          EducodeSales::CustomerExtension.find_by(school_id: d).update(customer_staff_id: params[:staff_id])
        else
          EducodeSales::CustomerExtension.create(customer_staff_id: params[:staff_id], school_id: d)
        end
      end
        render_success
      end
    end
  end

Version data entries

181 entries across 181 versions & 1 rubygems

Version Path
educode_sales-1.10.74 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.73 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.72 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.71 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.70 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.59 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.58 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.49 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.48 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.46 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.41 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.37 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.36 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.35 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.34 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.33 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.31 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.30 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.29 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-1.10.28 app/controllers/educode_sales/customer_extensions_controller.rb