diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-09 21:12:28 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-09 21:12:28 +0000 |
commit | d872281975b2bdcfcd06e21b55d78c8fb53ba5d1 (patch) | |
tree | 8d380e62fc9df44a12d0132dfcdd58046c05ab8a /activerecord/CHANGELOG | |
parent | 966c276d6071f8c331f75820f8c2f30d1bba02b2 (diff) | |
download | rails-d872281975b2bdcfcd06e21b55d78c8fb53ba5d1.tar.gz rails-d872281975b2bdcfcd06e21b55d78c8fb53ba5d1.tar.bz2 rails-d872281975b2bdcfcd06e21b55d78c8fb53ba5d1.zip |
Fixed to_xml across the board to use nice indention, better skip_attributes workings, no type on strings, and cleaned tests [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3829 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r-- | activerecord/CHANGELOG | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 760863de45..c3fdbe38c6 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,42 @@ *SVN* +* Added Base#to_xml that'll turn the current record into a XML representation [DHH]. Example: + + topic.to_xml + + ...returns: + + <?xml version="1.0" encoding="UTF-8"?> + <topic> + <title>The First Topic</title> + <author-name>David</author-name> + <id type="integer">1</id> + <approved type="boolean">false</approved> + <replies-count type="integer">0</replies-count> + <bonus-time type="datetime">2000-01-01 08:28:00</bonus-time> + <written-on type="datetime">2003-07-16 09:28:00</written-on> + <content>Have a nice day</content> + <author-email-address>david@loudthinking.com</author-email-address> + <parent-id></parent-id> + <last-read type="date">2004-04-15</last-read> + </topic> + + ...and you can configure with: + + topic.to_xml(:skip_instruct => true, :skip_attributes => [ :id, bonus_time, :written_on, replies_count ]) + + ...that'll return: + + <topic> + <title>The First Topic</title> + <author-name>David</author-name> + <approved type="boolean">false</approved> + <content>Have a nice day</content> + <author-email-address>david@loudthinking.com</author-email-address> + <parent-id></parent-id> + <last-read type="date">2004-04-15</last-read> + </topic> + * Allow :counter_cache to take a column name for custom counter cache columns [Jamis Buck] * Documentation fixes for :dependent [robby@planetargon.com] |