README.md in model_xml-1.0.0 vs README.md in model_xml-1.0.1

- old
+ new

@@ -33,11 +33,11 @@ class User < ActiveRecord::Base model_xml :full_name, :dob def full_name - "#{first_name} {last+name}" + "#{first_name} #{last_name}" end end behaves as expected: @@ -63,11 +63,11 @@ password last_logged_in end end -Finally, you can declare named blocks using block notation like this: +For conditional data sets, you can declare named blocks using block notation like this: class User < ActiveRecord::Base model_xml :first_name, :last_name model_xml :personal_details do dob @@ -90,9 +90,12 @@ <last_name>Jones</last_name> <dob>1970-12-23</dob> <password>foo</password> <last_logged_in>2012-04-10</last_logged_in> </user> + +Finally, if any of the field names return objects which themselves respond to to_xml, then their xml representations will be embedded. So if you use the name of an active record association, then the child(ren) should be embedded in the xml as you'd expect. + Source ====== Source is on github https://github.com/rob-anderson/model_xml