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

1506 document passing arbitrary options to serializer #1545

Merged
merged 7 commits into from
Mar 7, 2016
Merged

1506 document passing arbitrary options to serializer #1545

merged 7 commits into from
Mar 7, 2016

Conversation

hiimtaylorjones
Copy link
Contributor

Purpose

Wrote a quick bit about passing arbitrary parameters into AMS.

Changes

  • Created the markdown file - docs/general/passing_arbitrary_options.md

Caveats

None.

Related GitHub issues

#599
#1506

@bf4
Copy link
Member

bf4 commented Feb 29, 2016

👍

```

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
Copy link
Member

Choose a reason for hiding this comment

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

basically adapter options

@bf4
Copy link
Member

bf4 commented Feb 29, 2016

related #1252

end
```

This works all fine and well, but maybe you passing in some "artibrary" options
Copy link
Member

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
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On it.

@bf4
Copy link
Member

bf4 commented Mar 1, 2016

@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
Copy link
Member

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)
Copy link
Member

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/.

Copy link
Member

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.

Copy link
Contributor Author

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.

@maurogeorge
Copy link
Member

@bf4 I like the idea of the docs. I added only a minor change in the place of the content.

bf4 added a commit that referenced this pull request Mar 7, 2016
…passing-arbitrary-options-to-serializer

[DOCS] 1506 document passing arbitrary options to serializer
@bf4 bf4 merged commit 1a312bc into rails-api:master Mar 7, 2016
@bf4
Copy link
Member

bf4 commented Mar 7, 2016

Merged, yay!

groyoh pushed a commit to groyoh/active_model_serializers that referenced this pull request Mar 8, 2016
NullVoxPopuli added a commit that referenced this pull request Mar 8, 2016
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.

4 participants