Sha256: 841e1562403475ef1a33851f642b093ffde13ccc600285c2d6f30c4cdb98ed16
Contents?: true
Size: 721 Bytes
Versions: 19
Compression:
Stored size: 721 Bytes
Contents
module NCore module UpdateBulk extend ActiveSupport::Concern module ClassMethods def bulk_update!(ids, params={}) raise(module_parent::RecordNotFound, "ids must not be empty") if ids.blank? params = parse_request_params(params, json_root: json_root) params[:ids] = ids parsed, creds = request(:put, resource_path, params) if parsed[:errors].any? raise module_parent::BulkActionError, parsed[:errors] else parsed[:metadata] end end def bulk_update(ids, params={}) bulk_update!(ids, params) rescue module_parent::RecordNotFound, module_parent::BulkActionError false end end end end
Version data entries
19 entries across 19 versions & 1 rubygems