Sha256: 1c7fa82ce30354b8620026e741bade08ae4e78e4ab53c0793809149d355d8d4b

Contents?: true

Size: 314 Bytes

Versions: 14

Compression:

Stored size: 314 Bytes

Contents

module KB
  module Upsertable
    extend ActiveSupport::Concern

    included do
      include Queryable
    end

    module ClassMethods
      def upsert(attributes)
        from_api kb_client.upsert(attributes)
      rescue Faraday::Error => e
        raise KB::Error.from_faraday(e)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
barkibu-kb-0.27.0 lib/kb/models/concerns/upsertable.rb
barkibu-kb-0.26.0 lib/kb/models/concerns/upsertable.rb
barkibu-kb-0.25.0 lib/kb/models/concerns/upsertable.rb
barkibu-kb-0.24.1 lib/kb/models/concerns/upsertable.rb
barkibu-kb-0.24.0 lib/kb/models/concerns/upsertable.rb
barkibu-kb-0.23.0 lib/kb/models/concerns/upsertable.rb
barkibu-kb-0.22.0 lib/kb/models/concerns/upsertable.rb
barkibu-kb-0.21.0 lib/kb/models/concerns/upsertable.rb
barkibu-kb-0.20.0 lib/kb/models/concerns/upsertable.rb
barkibu-kb-0.19.0 lib/kb/models/concerns/upsertable.rb
barkibu-kb-0.18.0 lib/kb/models/concerns/upsertable.rb
barkibu-kb-0.17.0 lib/kb/models/concerns/upsertable.rb
barkibu-kb-0.16.2 lib/kb/models/concerns/upsertable.rb
barkibu-kb-0.16.1 lib/kb/models/concerns/upsertable.rb