Sha256: 4f4dc10fc2c32c0dd0956565e2aa51f58f60a56afe75f52133a6dc375fa2a35b
Contents?: true
Size: 399 Bytes
Versions: 23
Compression:
Stored size: 399 Bytes
Contents
module Saviour class PersistenceLayer def initialize(model) @model = model end def read(attr) @model.read_attribute(attr) end def write(attr, value) @model.update_columns(attr => value) end def write_attrs(attributes) @model.update_columns(attributes) end def persisted? @model.persisted? || @model.destroyed? end end end
Version data entries
23 entries across 23 versions & 1 rubygems