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

Return empty hash when url_options not provided #110

Merged
merged 1 commit into from
Aug 7, 2012

Conversation

pivotal-medici
Copy link

ActionPack url_for expects a hash for url_options when doing a merge. The serializer class in active_model_serializers overrides url_options so when they aren't supplied will return nil. This means that we can't use route helpers in the serializer.

This patch ensures that a hash is always returned.

josevalim pushed a commit that referenced this pull request Aug 7, 2012
Return empty hash when url_options not provided
@josevalim josevalim merged commit 655c4fe into rails-api:master Aug 7, 2012
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.

2 participants