Sha256: 9a141ee605f89036f6c14e7b77f75a60ff26a26eb8e81ab5f042da73d6516ee9
Contents?: true
Size: 606 Bytes
Versions: 13
Compression:
Stored size: 606 Bytes
Contents
require 'active_model' module ActiveModel module Type module Salesforce class Multipicklist < ActiveModel::Type::Value include ActiveModel::Type::Helpers::Mutable def type :multipicklist end def deserialize(value) value.to_s.split(';') end def serialize(value) return if value.blank? return value if value.is_a?(::String) value.to_a.reject(&:empty?).join(';') end end end end end ActiveModel::Type.register(:multipicklist, ActiveModel::Type::Salesforce::Multipicklist)
Version data entries
13 entries across 13 versions & 1 rubygems