aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/serializers
Commit message (Collapse)AuthorAgeFilesLines
* dry up compute type in attributeAaron Patterson2010-12-151-16/+10
|
* to_xml doesn't work in such case: Event.select('title as t').to_xml [#4840 ↵Víctor Martínez2010-12-151-2/+8
| | | | | | state:resolved] NilClass.type is no longer defined in Ruby 1.9 and causes ActiveRecord::Base.to_xml to fail with message: undefined method `type' for nil:NilClass
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* to_xml with :include should skip_instruct on the included records [#4506 ↵Lawrence Pit2010-04-301-1/+1
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Move several configuration values from Hash to ActiveSupport::XmlMini, which ↵José Valim2010-04-291-50/+35
| | | | | | 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é Valim2010-04-221-11/+0
| | | | code duplication.
* Avoid deprecated String#to_a by using Array.wrap(...) instead of Array(...)Jeremy Kemper2010-04-101-1/+2
|
* Break up concerns for choosing what attributes should be serialized and the ↵Joshua Peek2009-08-132-23/+10
| | | | actual serializer
* Patch to ActiveModel's (and ActiveRecord, by association) XML serialization: ↵John Maxwell2009-07-221-0/+15
| | | | | | 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>
* Integrate AMo XML serializer into ARJoshua Peek2009-07-111-109/+4
|
* Integrate AMo JSON serializer into ARJoshua Peek2009-07-032-86/+11
|
* Updated require for AMo moveYehuda Katz + Carl Lerche2009-06-171-1/+1
|
* Fix AR json encodingJeremy Kemper2009-06-081-25/+7
|
* Break up DependencyModule's dual function of providing a "depend_on" DSL and ↵Joshua Peek2009-05-281-1/+1
| | | | "included" block DSL into separate modules. But, unify both approaches under AS::Concern.
* Cherry-pick core extensionsJeremy Kemper2009-05-131-1/+4
|
* Use DependencyModule for included hooks in ActiveRecordBryan Helmkamp2009-05-111-3/+4
|
* Fix differing rails_to_json arityJeremy Kemper2009-04-261-3/+6
|
* * Add pluggable JSON backends with support for the JSON gem. [rick]rick2009-04-231-3/+7
| | | | | | | | | | | | | | Example: ActiveSupport::JSON.backend = "JSONGem" All internal Rails JSON encoding is now handled by ActiveSupport::JSON.encode(). Use of #to_json is not recommended, as it may clash with other libraries that overwrite it. However, you can recover Rails specific functionality if you really want to use #to_json. gem 'json' ActiveSupport::JSON.backend = "JSONGem" class ActiveRecord::Base alias to_json rails_to_json end
* Opt in to JSONJeremy Kemper2009-04-221-0/+2
|
* Ensure ActiveRecord#to_xml respects :skip_types for included associations ↵Bruce Krysiak2009-03-101-6/+12
| | | | | | [#1632 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge docrails and update the release notesPratik Naik2009-02-281-0/+19
|
* Added a :camelize option to ActiveRecord and Hash to_xml serialization and ↵Bruce Krysiak2008-12-101-7/+16
| | | | | | from_xml deserialization Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Merge docrails.Pratik Naik2008-05-251-3/+3
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Improve documentation coverage and markupXavier Noria2008-05-022-19/+19
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Tweak ActiveRecord::Base#to_json to include a root value in the returned ↵Rick Olson2008-04-011-1/+16
| | | | | | hash: {post: {title: ...}} [rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9202 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve documentation.Pratik Naik2008-03-262-40/+57
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that to_xml should not automatically pass :procs to associations ↵David Heinemeier Hansson2007-12-031-8/+10
| | | | | | included with :include (closes #10162) [chuyeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8258 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Base#to_xml supports the nil="true" attribute like Hash#to_xml. Closes #8268.Jeremy Kemper2007-11-141-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8138 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Smattering of grammatical fixes to documentation. Closes #10083 [BobSilva]Marcel Molina2007-11-081-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add missing file for revision #8090Marcel Molina2007-11-061-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8092 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Json related documentation for render and the AR serializer. Closes ↵Michael Koziarski2007-10-151-0/+53
| | | | | | #9814. Closes #9833. [chuyeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#to_json takes :only or :except options to specific or omit certain hash ↵Jeremy Kemper2007-10-041-1/+1
| | | | | | keys. Enumerable#to_json passes through its options to each element. Closes #9751. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7736 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed spelling errors (closes #9706) [tarmo/rmm5t]David Heinemeier Hansson2007-09-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :include option to to_json (closes #9677) [chuyeow]David Heinemeier Hansson2007-09-281-56/+38
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7663 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added ActiveRecord::Base#to_json/from_json (currently does not support ↵David Heinemeier Hansson2007-09-202-0/+345
:include like to_xml) [DHH]. Added ActiveRecord::Base#from_xml [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de