Sha256: ad23e9761923ee177fb3d391859f940b4693378b115400239cd98e7f44997c22
Contents?: true
Size: 529 Bytes
Versions: 10
Compression:
Stored size: 529 Bytes
Contents
# frozen_string_literal: true module LunaPark module Extensions module Repositories module Postgres module Update def save(input) entity = wrap(input) entity.updated_at = Time.now.utc row = to_row(entity) new_row = dataset.returning.where(primary_key => row[primary_key]).update(row).first new_attrs = from_row(new_row) entity.set_attributes(new_attrs) entity end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems