Add Model#attributes helper; make test attributes explicit#2021
Merged
bf4 merged 1 commit intorails-api:0-10-stablefrom Jan 8, 2017
Merged
Add Model#attributes helper; make test attributes explicit#2021bf4 merged 1 commit intorails-api:0-10-stablefrom
bf4 merged 1 commit intorails-api:0-10-stablefrom
Conversation
|
@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. |
d3a8ed9 to
5c79415
Compare
dd2081d to
963ed0f
Compare
963ed0f to
d5babdd
Compare
bf4
commented
Jan 10, 2017
| 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: |
bf4
commented
Jan 16, 2017
| else | ||
| super | ||
| # At this time, just for organization of intent | ||
| class_attribute :association_names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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