Skip to content

support ActiveModel::Serializers #148 #213

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

Closed
wants to merge 3 commits into from

Conversation

drewda
Copy link

@drewda drewda commented Oct 29, 2014

@ctran
Copy link
Owner

ctran commented Oct 29, 2014

Does it make sense to annotate serializers? Can you show me a real example of what it looks like?

@drewda
Copy link
Author

drewda commented Oct 31, 2014

I think it makes sense to annotate serializers that are associated one-to-one with a model. (I can imagine other types of serializers that may not map on directly to an ActiveRecord model, but those probably have a different name--so this pattern matcher shouldn't annotate those.)

Here's an example of a model and its serializer.

@ctran
Copy link
Owner

ctran commented Nov 1, 2014

Would you be open to either adding a unit test or integration test ?

@drewda
Copy link
Author

drewda commented Nov 3, 2014

@ctran I'd be glad to write a test or two, but I'm having trouble figuring out how they are structured. Can you point me to an overview doc or a good example spec?

@ctran
Copy link
Owner

ctran commented Nov 4, 2014

Take a look at annotate_models_spec.rb for examples. In particular, you can do something similar to the "annotating a file" spec.

@ctran
Copy link
Owner

ctran commented Dec 30, 2014

Hey, is this similar to #219? Thanks for trying to help out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants