Sha256: 9282ccda83a070e11f28a47922cf871a65b9df895c8125ded31cbfd5f2334c63
Contents?: true
Size: 651 Bytes
Versions: 1
Compression:
Stored size: 651 Bytes
Contents
require 'ixtlan/babel/serializer' module Ixtlan module Babel class NoTimestampSerializer < Serializer def self.add_defaults(root = nil) if root add_context(:default, :root => root) add_no_timestamp_context(:collection, :root => root) else add_context(:default) add_no_timestamp_context(:collection) end end def self.add_no_timestamp_context(key, options = {}) except = (options[:except] || []).dup except << :updated_at except << :created_at add_context(key, options.merge({:except => except})) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ixtlan-babel-0.1.2 | lib/ixtlan/babel/no_timestamp_serializer.rb |