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 for type attribute #1037

Merged
merged 2 commits into from
Aug 12, 2015
Merged

Conversation

lanej
Copy link
Contributor

@lanej lanej commented Aug 4, 2015

No description provided.


def test_type_attribute_override
attribute_serializer = Class.new(ActiveModel::Serializer) do
attribute :id, key: :type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: it's not an override anymore if the internal name is now 'json_api_type', right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very true.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👼

@joaomdmoura
Copy link
Member

@lanej Could you please rebase and squash it? 😁
As I said, great work here, I was looking forward to it! 👍

* don't overshadow serializer variable
* "namespace" json_api specific type method
@lanej
Copy link
Contributor Author

lanej commented Aug 11, 2015

@joaomdmoura rebased.

@joaomdmoura
Copy link
Member

Great, I'm merging it.

joaomdmoura added a commit that referenced this pull request Aug 12, 2015
@joaomdmoura joaomdmoura merged commit a3d75c9 into rails-api:master Aug 12, 2015
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

3 participants