Add missing commas

This commit is contained in:
Joel Johnson 2018-01-31 23:20:34 -06:00 committed by GitHub
parent 6e1b5d2e17
commit 7d3dac33ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,7 +159,7 @@ json_string = MovieSerializer.new([movie, movie], options).serialized_json
class MovieSerializer
include FastJsonapi::ObjectSerializer
set_type :movie # optional
cache_options enabled: true cache_length: 12.hours
cache_options enabled: true, cache_length: 12.hours
attributes :name, :year
end
```
@ -169,7 +169,7 @@ end
Option | Purpose | Example
------------ | ------------- | -------------
set_type | Type name of Object | ```set_type :movie ```
cache_options | Hash to enable caching and set cache length | ```cache_options enabled: true cache_length: 12.hours```
cache_options | Hash to enable caching and set cache length | ```cache_options enabled: true, cache_length: 12.hours```
id_method_name | Set custom method name to get ID of an object | ```has_many :locations, id_method_name: :place_ids ```
object_method_name | Set custom method name to get related objects | ```has_many :locations, object_method_name: :places ```
record_type | Set custom Object Type for a relationship | ```belongs_to :owner, record_type: :user```