From bac812f907f695d717c1cbada27468b729d0c7a5 Mon Sep 17 00:00:00 2001 From: Lucas Hosseini Date: Fri, 28 Aug 2015 20:01:56 +0200 Subject: [PATCH] Add documentation about configuration options. --- docs/README.md | 1 + docs/general/configuration_options.md | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 docs/general/configuration_options.md diff --git a/docs/README.md b/docs/README.md index 5bd9c2e1..4f9172ab 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,6 +8,7 @@ This is the documentation of AMS, it's focused on the **0.10.x version.** - [Getting Started](general/getting_started.md) - [Adapters](general/adapters.md) +- [Configuration Options](general/configuration_options.md) ## How to diff --git a/docs/general/configuration_options.md b/docs/general/configuration_options.md new file mode 100644 index 00000000..2512bf46 --- /dev/null +++ b/docs/general/configuration_options.md @@ -0,0 +1,11 @@ +# Configuration Options + +The following configuration options can be set on `ActiveModel::Serializer.config` inside an initializer. + +## General + +- `adapter`: The [adapter](adapters.md) to use. Possible values: `:flatten_json, :json, :json_api`. Default: `:flatten_json`. + +## JSON API + +- `jsonapi_resource_type`: Whether the `type` attributes of resources should be singular or plural. Possible values: `:singular, :plural`. Default: `:plural`.