Sha256: 452dd2c27b5aee64ae66271c830c4a351ba5fb0b8cd0d9bbdefc9e061a459a42
Contents?: true
Size: 576 Bytes
Versions: 47
Compression:
Stored size: 576 Bytes
Contents
module Locomotive module Steam module Models module Concerns module ToJson def to_hash {}.tap do |_attributes| attributes.each do |key, value| next if value && value.respond_to?(:repository) # skip associations _attributes[key.to_s] = value end end end def as_json(options = nil) to_hash.as_json(options) end def to_json as_json.to_json end end end end end end
Version data entries
47 entries across 47 versions & 1 rubygems