Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Dec 24, 2012
  1. @amatsuda
Commits on Dec 11, 2012
  1. @pixeltrix

    Only call `in_time_zone` on Time or DateTime instances

    pixeltrix authored
    Both String and Date now respond to in_time_zone so we need to
    check if the value is a Time or a DateTime.
Commits on Nov 28, 2012
  1. @steveklabnik

    Specify type of singular association during serialization

    steveklabnik authored
    When serialising a class, specify the type of any singular associations, if
    necessary. Rails already correctly specifies the :type of any enumerable
    association (e.g. a has_many association), but made no attempt to do so for
    non-enumerables (e.g. a has_one association).
    We must specify the :type of any STI association. A has_one
    association to a class which uses single-table inheritance is an example of
    this type of association.
    Fixes #7471
Commits on Oct 27, 2012
  1. fix AM::Serializers titles [ci skip]

    Francesco Rodriguez authored
  2. AM::Serializers::Xml depends on AM::Naming

    Francesco Rodriguez authored
Commits on Aug 14, 2012
  1. @anthonyalberto

    Following the false issue reporting I did here : #6958

    anthonyalberto authored
    - Enable propagation of :skip_types, :dasherize and :camelize on included models by default
    - Adding the option to override this propagation on a per-include basis (:include => { :model => { :dasherize => false } }
    - Enough tests to prove it works
    - Updated activemodel
    Squashed my commits
Commits on Aug 4, 2012
  1. @vijaydev

    copy edits [ci skip]

    vijaydev authored
Commits on Aug 2, 2012
  1. @paneq

    Fix ActiveModel::Serializers::Xml#to_xml reference

    paneq authored
    Link to ActiveRecord::Serialization#to_xml for more details
Commits on Jul 31, 2012
  1. update ActiveModel::Serializers documentation [ci skip]

    Francesco Rodriguez authored
Commits on May 23, 2012
  1. @acapilleri

    changed xml type datetime to dateTime, fixes #6328

    acapilleri authored
    XmlMini define the xml 'datatime', but according to could be better
    change this to 'dateTime' with upper case letter 'T.
    So 'DateTime' and 'Time' are redefined from 'datetime' to 'dateTime'
    add the changing to the changelog
Commits on May 11, 2012
  1. @jonleighton
Commits on Jan 6, 2012
  1. @rafaelfranca
Commits on Nov 30, 2011
  1. @josevalim

    Revert "Implement ArraySerializer and move old serialization API to a…

    josevalim authored
    … new namespace."
    This reverts commit 8896b4f.
Commits on Nov 23, 2011
  1. @josevalim

    Implement ArraySerializer and move old serialization API to a new nam…

    josevalim authored
    The following constants were renamed:
      ActiveModel::Serialization     => ActiveModel::Serializable
      ActiveModel::Serializers::JSON => ActiveModel::Serializable::JSON
      ActiveModel::Serializers::Xml  => ActiveModel::Serializable::XML
    The main motivation for such a change is that `ActiveModel::Serializers::JSON`
    was not actually a serializer, but a module that when included allows the target to be serializable to JSON.
    With such changes, we were able to clean up the namespace to add true serializers as the ArraySerializer.
Commits on Sep 18, 2011
  1. @josevalim
Commits on Jul 17, 2011
  1. ActiveModel support for the :include serialization option

    John Firebaugh authored
    This commit moves support for the :include serialization option for
    serializing associated objects out of ActiveRecord in into ActiveModel.
    The following methods support the :include option:
      * serializable_hash
      * to_json
      * to_xml
    Instances must respond to methods named by the values of the :includes
    array (or keys of the :includes hash). If an association method returns
    an object that is_a?(Enumerable) (which AR has_many associations do), it
    is assumed to be a collection association, and its elements must respond
    to :serializable_hash. Otherwise it must respond to :serializable_hash
    While here, fix #858, XmlSerializer should not singularize already
    singular association names.
Commits on Jun 3, 2011
  1. @vijaydev
Commits on May 23, 2011
  1. @smartinez87
Commits on May 18, 2011
  1. @jimherz @joshk

    Attributes with :string type should not be given the type passed in m…

    jimherz authored joshk committed
    …odel serialization options. Closes #1058
Commits on May 10, 2011
  1. @jaw6
Commits on Feb 21, 2011
  1. @fxn

    copy-edits 34316d8

    fxn authored
  2. @nixterrimus
Commits on Dec 9, 2010
  1. @michaeldv @josevalim

    Take into account current time zone when serializing datetime values [#…

    michaeldv authored josevalim committed
    …6096 state:resolved]
    Signed-off-by: José Valim <>
Commits on Sep 22, 2010
  1. @miloops @spastorino

    Perf: refactor methods using inject when not need in activemodel.

    miloops authored spastorino committed
    Signed-off-by: Santiago Pastorino <>
Commits on Sep 2, 2010
  1. @andreas @josevalim

    ActiveModel#to_xml fix (renamed parameter).

    andreas authored josevalim committed
    Signed-off-by: José Valim <>
Commits on Aug 14, 2010
  1. @spastorino

    Deletes trailing whitespaces (over text files only find * -type f -ex…

    spastorino authored
    …ec sed 's/[ \t]*$//' -i {} \;)
Commits on Jun 14, 2010
  1. @rizwanreza
Commits on May 12, 2010
  1. @spastorino @jeremy

    Make ActiveResource serialize XML correctly when element_name is set.

    spastorino authored jeremy committed
    Signed-off-by: Jeremy Kemper <>
Commits on Apr 29, 2010
  1. @josevalim

    Move several configuration values from Hash to ActiveSupport::XmlMini…

    josevalim authored
    …, which both Hash and Array depends on.
    Also, refactored ActiveModel serializers to just use ActiveSupport::XmlMini.to_tag. As consequence, if a serialized attribute is an array or a hash, it's not encoded as yaml, but as a hash or array.
Commits on Apr 22, 2010
  1. @josevalim
Commits on Mar 27, 2010
  1. @jeremy

    Use Array.wrap uniformly

    jeremy authored
Commits on Jan 17, 2010
  1. @mikel
Commits on Aug 14, 2009
  1. @josh

    Break up concerns for choosing what attributes should be serialized a…

    josh authored
    …nd the actual serializer
Commits on Jul 23, 2009
  1. @josh

    Dasherize XML root by default to avoid invalid tags "<admin/posts>...…

    josh authored
    …</admin/posts>" [#2875 state:resolved]
  2. @johnmaxwell @josh

    Patch to ActiveModel's (and ActiveRecord, by association) XML seriali…

    johnmaxwell authored josh committed
    …zation: If two parameters are present in Procs supplied to to_xml's :procs option, the model being serialized will be passed as the second argument [#2373 state:resolved]
    Signed-off-by: Joshua Peek <>
Something went wrong with that request. Please try again.