Sha256: f83333f58a466600966dfd8249b94bf5e0710dd86fc9d7397274430ed17f96f0
Contents?: true
Size: 794 Bytes
Versions: 7
Compression:
Stored size: 794 Bytes
Contents
# Copyright (c) 2008-2013 Michael Dvorkin and contributors. # # Fat Free CRM is freely distributable under the terms of MIT license. # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ # Take into account current time zone when serializing datetime values # See: https://rails.lighthouseapp.com/projects/8994/tickets/6096-to_xml-datetime-format-regression ActiveModel::Serializers::Xml::Serializer::Attribute.class_eval do def initialize(name, serializable, raw_value=nil) @name, @serializable = name, serializable raw_value = raw_value.in_time_zone if raw_value.respond_to?(:in_time_zone) @value = raw_value || @serializable.send(name) @type = compute_type end end
Version data entries
7 entries across 7 versions & 1 rubygems