Sha256: 281352f7529f461619539a90a4d3b68c1649a16956031460fa17837181dc7666
Contents?: true
Size: 737 Bytes
Versions: 70
Compression:
Stored size: 737 Bytes
Contents
module Eco module API class MicroCases # @note by default `supervisor_id` is always excluded. # @param person [Ecoportal::API::V1::Person] the person we want to update, carrying the changes to be done. # @param options [Hash] the options. # @return [Array<String>] the core parameters that should not be included. def core_excluded(person, options) ["supervisor_id"].tap do |core_excluded| unless person.new? exclusions = ["name", "external_id", "email", "filter_tags"].select do |attr| options.dig(:exclude, attr.to_sym) end core_excluded.concat(exclusions) end end end end end end
Version data entries
70 entries across 70 versions & 1 rubygems