Add missing commas
This commit is contained in:
parent
6e1b5d2e17
commit
7d3dac33ba
@ -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```
|
||||
|
Loading…
x
Reference in New Issue
Block a user