-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
1506 document passing arbitrary options to serializer #1545
1506 document passing arbitrary options to serializer #1545
Conversation
👍 |
``` | ||
|
||
These options can be anything that isn't already reserved for use by AMS. For example, | ||
you won't be able to pass in a `meta` or `root` option like the example above. Those |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basically adapter options
related #1252 |
end | ||
``` | ||
|
||
This works all fine and well, but maybe you passing in some "artibrary" options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you passing in some "artibrary"
-> you want to pass in some arbitrary
@@ -0,0 +1,45 @@ | |||
## Passing Arbitrary Options To A Serializer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a line above this [Back to Guides](../README.md)
and change the header level to h1 # Passing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On it.
@rails-api/ams @rails-api/commit The tone of this guide is different from the others. I kind of like it and don't mind, but wanted to see what you think. |
... | ||
``` | ||
|
||
### posts_serializer.rb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo. Should be post_serializer.rb
.
@@ -16,6 +16,7 @@ This is the documentation of ActiveModelSerializers, it's focused on the **0.10. | |||
- [Instrumentation](general/instrumentation.md) | |||
- [JSON API Schema](jsonapi/schema.md) | |||
- [ARCHITECTURE](ARCHITECTURE.md) | |||
- [Passing Arbitrary Options](general/passing_arbitrary_options.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering if this should be in howto/
. I'm thinking serializers.md#other
(instance_options) and rendering.md#adapter_opts
(passing arbitrary options) in general/
should reference this file located in howto/
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think this should be under the How to section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with that as well. on it.
@bf4 I like the idea of the docs. I added only a minor change in the place of the content. |
…passing-arbitrary-options-to-serializer [DOCS] 1506 document passing arbitrary options to serializer
Merged, yay! |
Add entry in CHANGELOG for #1545
Purpose
Wrote a quick bit about passing arbitrary parameters into AMS.
Changes
Caveats
None.
Related GitHub issues
#599
#1506