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

Allow serializer#as_json to be called with nil #477

Merged
merged 1 commit into from Dec 30, 2013
Merged

Allow serializer#as_json to be called with nil #477

merged 1 commit into from Dec 30, 2013

Conversation

gtd
Copy link

@gtd gtd commented Dec 30, 2013

This is the form that ActiveSupport 3.1 Object#to_json invokes as reported in #457.

Here's a greenfield 3.1.12 app with a minimal test demonstrating the problem: https://github.com/gtd/active_model_serializer_fail/commits/master

I don't think master supports Rails 3.1 anymore, but I'll have a look if there is still a failure path on the rewritten master.

This is the form that ActiveSupport 3.1 Object#to_json invokes.
@gtd
Copy link
Author

gtd commented Dec 30, 2013

Confirmed that it is not an issue in Rails 3.2 even on the 0.8 branch:

https://github.com/gtd/active_model_serializer_fail/tree/rails3-2

spastorino added a commit that referenced this pull request Dec 30, 2013
Allow serializer#as_json to be called with nil
@spastorino spastorino merged commit a9e7319 into rails-api:0-8-stable Dec 30, 2013
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