mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Correct Adapter & SerializableResource examples
This commit is contained in:
parent
e2ded594d3
commit
f3acf4e7a2
@ -137,7 +137,7 @@ The model can be serialized as:
|
||||
|
||||
```ruby
|
||||
options = {}
|
||||
serialization = SerializableResource.new(resource, options)
|
||||
serialization = ActiveModelSerializers::SerializableResource.new(resource, options)
|
||||
serialization.to_json
|
||||
serialization.as_json
|
||||
```
|
||||
@ -146,7 +146,7 @@ SerializableResource delegates to the adapter, which it builds as:
|
||||
|
||||
```ruby
|
||||
adapter_options = {}
|
||||
adapter = Adapter.create(serializer, adapter_options)
|
||||
adapter = ActiveModelSerializers::Adapter.create(serializer, adapter_options)
|
||||
adapter.to_json
|
||||
adapter.as_json
|
||||
adapter.serializable_hash
|
||||
|
||||
Loading…
Reference in New Issue
Block a user