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