Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialized methods that return nil should not be considered YAML #200

Closed
wants to merge 1 commit into from
Closed

Serialized methods that return nil should not be considered YAML #200

wants to merge 1 commit into from

Conversation

jaw6
Copy link
Contributor

@jaw6 jaw6 commented Mar 3, 2011

The way ActiveModel computes the type of serializable methods and attributes, any that return nil will be described as being YAML.

This produces XML like:

<person>
  <name>John Doe</name>
  <preferences type="yaml" nil="true"></preferences>
</person>

However, in many cases, the 'type="yaml"' part is unnecessary, and potentially misleading.

With this patch, the equivalent to the above XML would be:

<person>
  <name>John Doe</name>
  <preferences nil="true"></preferences>
</person>

@josevalim
Copy link
Contributor

Could you please rebase this pull request? Thanks a lot!

@ghost ghost assigned josevalim May 7, 2011
@jaw6 jaw6 closed this May 10, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants