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 #492

Merged
merged 1 commit into from May 10, 2011

Conversation

Projects
None yet
2 participants
@jaw6
Contributor

jaw6 commented May 10, 2011

(Rebased version of #200 (commits))

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 added a commit that referenced this pull request May 10, 2011

Merge pull request #492 from jaw6/master
Serialized methods that return nil should not be considered YAML

@josevalim josevalim merged commit ceaf73a into rails:master May 10, 2011

matthewd pushed a commit that referenced this pull request Apr 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment