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

Add Model#attributes helper; make test attributes explicit #2021

Merged
merged 1 commit into from
Jan 8, 2017

Conversation

bf4
Copy link
Member

@bf4 bf4 commented Jan 7, 2017

Purpose

Work around the breaking changes from #1982 and #1984 and their fix #1998 by simply not making the breaking change in the first place.

Changes

Add ActiveModelSerializers::Model#attributes

Tests are now less magical and more explicit.

Caveats

None

@mention-bot
Copy link

@bf4, thanks for your PR! By analyzing the history of the files in this pull request, we identified @NullVoxPopuli, @marcgarreau and @ggordon to be potential reviewers.

@bf4 bf4 merged commit 4e6bd61 into rails-api:0-10-stable Jan 8, 2017
@bf4 bf4 deleted the make_tests_explicit branch January 8, 2017 21:37
When you are first getting started with ActiveModelSerializers, it may seem only `ActiveRecord::Base` objects can be serializable, but pretty much any object can be serializable with ActiveModelSerializers. Here is an example of a PORO that is serializable:
When you are first getting started with ActiveModelSerializers, it may seem only `ActiveRecord::Base` objects can be serializable,
but pretty much any object can be serializable with ActiveModelSerializers.
Here is an example of a PORO that is serializable in most situations:
Copy link
Member Author

Choose a reason for hiding this comment

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

related #1910

else
super
# At this time, just for organization of intent
class_attribute :association_names
Copy link
Member Author

Choose a reason for hiding this comment

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

see #1961

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

Successfully merging this pull request may close these issues.

None yet

2 participants