Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | changed xml type datetime to dateTime, fixes #6328 | Angelo capilleri | 2012-05-23 | 1 | -1/+1 |
| | | | | | | | | | XmlMini define the xml 'datatime', but according to http://www.w3.org/TR/xmlschema-2/#dateTime 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 | ||||
* | Use respond_to?(:to_ary) rather than is_a?(Enumerable) to detect ↵ | Jon Leighton | 2012-05-11 | 1 | -1/+3 |
| | | | | collection-thing. | ||||
* | Remove Array.wrap call in ActiveModel | Rafael Mendonça França | 2012-01-06 | 1 | -3/+2 |
| | |||||
* | Support configuration on ActiveRecord::Model. | Jon Leighton | 2011-12-28 | 1 | -1/+2 |
| | | | | | | | | | | | | | | | The problem: We need to be able to specify configuration in a way that can be inherited to models that include ActiveRecord::Model. So it is no longer sufficient to put 'top level' config on ActiveRecord::Base, but we do want configuration specified on ActiveRecord::Base and descendants to continue to work. So we need something like class_attribute that can be defined on a module but that is inherited when ActiveRecord::Model is included. The solution: added ActiveModel::Configuration module which provides a config_attribute macro. It's a bit specific hence I am not putting this in Active Support or making it a 'public API' at present. | ||||
* | Revert "Implement ArraySerializer and move old serialization API to a new ↵ | José Valim | 2011-11-30 | 2 | -8/+285 |
| | | | | | | | | | | | | | namespace." This reverts commit 8896b4fdc8a543157cdf4dfc378607ebf6c10ab0. Conflicts: activemodel/lib/active_model.rb activemodel/lib/active_model/serializable.rb activemodel/lib/active_model/serializer.rb activemodel/test/cases/serializer_test.rb | ||||
* | Implement ArraySerializer and move old serialization API to a new namespace. | José Valim | 2011-11-23 | 2 | -285/+8 |
| | | | | | | | | | | | | | 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. | ||||
* | Change one more place for JSON string to Hash | Robert Ross | 2011-10-04 | 1 | -1/+1 |
| | |||||
* | Fix as_json doc to say what it actually returns. | Robert Ross | 2011-10-04 | 1 | -1/+1 |
| | |||||
* | Refactor AMo as_json. | José Valim | 2011-09-23 | 1 | -9/+5 |
| | |||||
* | fixed a bug with the json serialization when the class setting is set to not ↵ | Matt Aimonetti | 2011-09-22 | 1 | -12/+10 |
| | | | | include the root, but an instance is serialized with the root option passed as true | ||||
* | to_xml should also rely on serializable hash. | José Valim | 2011-09-18 | 1 | -31/+15 |
| | |||||
* | ActiveModel support for the :include serialization option | John Firebaugh | 2011-07-17 | 1 | -0/+40 |
| | | | | | | | | | | | | | | | | | | | | 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 itself. While here, fix #858, XmlSerializer should not singularize already singular association names. | ||||
* | Enable passing root: false to #to_json | Joe Fiorini | 2011-07-01 | 1 | -5/+17 |
| | |||||
* | use clearer variable name in examples | Vijay Dev | 2011-06-04 | 2 | -12/+12 |
| | |||||
* | Remove extra white spaces on ActiveModel docs. | Sebastian Martinez | 2011-05-23 | 1 | -2/+2 |
| | |||||
* | Attributes with :string type should not be given the type passed in model ↵ | Jim Herzberg | 2011-05-18 | 1 | -1/+1 |
| | | | | serialization options. Closes #1058 | ||||
* | Methods that return nil should not be considered YAML | Joshua Wehner | 2011-05-10 | 1 | -0/+1 |
| | |||||
* | copy-edits 34316d8 | Xavier Noria | 2011-02-21 | 1 | -7/+5 |
| | |||||
* | Docs: Update to_xml documentation to match as_json docuemntation | Nicholas Rowe | 2011-02-20 | 1 | -0/+25 |
| | |||||
* | Take into account current time zone when serializing datetime values [#6096 ↵ | Mike Dvorkin | 2010-12-09 | 1 | -0/+1 |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Perf: refactor methods using inject when not need in activemodel. | Emilio Tagua | 2010-09-22 | 1 | -4/+3 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | fixed some issues with JSON encoding | Jakub Suder | 2010-09-07 | 1 | -8/+6 |
| | | | | | | | | | | | - as_json in ActiveModel should return a hash and handle :only/:except/:methods options - Array and Hash should call as_json on their elements - json methods should not modify options argument [#5374 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | ActiveModel#to_xml fix (renamed parameter). | Andreas Garnæs | 2010-09-02 | 1 | -1/+1 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | to_json => as_json | James Miller | 2010-08-25 | 1 | -9/+9 |
| | |||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -1/+1 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | ActiveModel::Base doesn't exist, include_root_in_json is a class_attribute ↵ | Santiago Pastorino | 2010-08-10 | 1 | -3/+3 |
| | | | | for the classes which includes this module | ||||
* | edit pass to AMo::Serializers::JSON | Xavier Noria | 2010-08-06 | 1 | -9/+9 |
| | |||||
* | adding proper markup to comment | Neeraj Singh | 2010-07-16 | 1 | -2/+2 |
| | |||||
* | Added headings to serializers. | Rizwan Reza | 2010-06-14 | 2 | -2/+6 |
| | |||||
* | Really make include_root_in_json default to true [#3770 state:resolved] | José Valim | 2010-06-08 | 1 | -3/+6 |
| | |||||
* | Make ActiveResource serialize XML correctly when element_name is set. | Santiago Pastorino | 2010-05-12 | 1 | -1/+1 |
| | | | | | | [#4529] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Active Model JSON serializer now supports custom root option | Jatinder Singh | 2010-05-04 | 1 | -1/+5 |
| | | | | | | [#4515 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Move several configuration values from Hash to ActiveSupport::XmlMini, which ↵ | José Valim | 2010-04-29 | 1 | -111/+51 |
| | | | | | | 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. | ||||
* | Speed up xml serializer by computing values just once and remove unecessary ↵ | José Valim | 2010-04-22 | 1 | -18/+17 |
| | | | | code duplication. | ||||
* | Use Array.wrap uniformly | Jeremy Kemper | 2010-03-27 | 1 | -1/+2 |
| | |||||
* | Adding documentation for ActiveModel::Serialization | Mikel Lindsaar | 2010-01-17 | 1 | -2/+2 |
| | |||||
* | Change the ActiveModel::Base.include_root_in_json default to true for Rails ↵ | David Heinemeier Hansson | 2010-01-03 | 1 | -5/+3 |
| | | | | 3 [DHH] | ||||
* | Break up concerns for choosing what attributes should be serialized and the ↵ | Joshua Peek | 2009-08-13 | 2 | -38/+56 |
| | | | | actual serializer | ||||
* | Dasherize XML root by default to avoid invalid tags ↵ | Joshua Peek | 2009-07-22 | 1 | -1/+1 |
| | | | | "<admin/posts>...</admin/posts>" [#2875 state:resolved] | ||||
* | Patch to ActiveModel's (and ActiveRecord, by association) XML serialization: ↵ | John Maxwell | 2009-07-22 | 1 | -1/+5 |
| | | | | | | 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 <josh@joshpeek.com> | ||||
* | Kill AMo ivar attributes helper | Joshua Peek | 2009-07-20 | 2 | -2/+0 |
| | |||||
* | Integrate AMo XML serializer into AR | Joshua Peek | 2009-07-11 | 1 | -22/+27 |
| | |||||
* | Integrate AMo JSON serializer into AR | Joshua Peek | 2009-07-03 | 1 | -4/+69 |
| | |||||
* | Initial extraction of AMo xml serializer | Joshua Peek | 2009-07-03 | 2 | -15/+187 |
| | |||||
* | Ensure JSON serializer includes model naming | Joshua Peek | 2009-07-03 | 1 | -0/+2 |
| | |||||
* | Add basic JSON serializer to AMo | Joshua Peek | 2009-06-17 | 1 | -0/+38 |