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-0.9.95 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.94 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.93 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.92 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.91 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.90 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.89 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.86 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.84 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.83 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.82 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.81 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.80 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.79 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.78 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.77 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.76 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.75 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.74 app/controllers/educode_sales/customer_extensions_controller.rb
educode_sales-0.9.73 app/controllers/educode_sales/customer_extensions_controller.rb