Skip to content

Commit 2159e81

Browse files
author
Yohan Robert
committed
Merge pull request #1682 from swrobel/patch-1
Correct Adapter & SerializableResource examples
2 parents e2ded59 + f3acf4e commit 2159e81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ The model can be serialized as:
137137

138138
```ruby
139139
options = {}
140-
serialization = SerializableResource.new(resource, options)
140+
serialization = ActiveModelSerializers::SerializableResource.new(resource, options)
141141
serialization.to_json
142142
serialization.as_json
143143
```
@@ -146,7 +146,7 @@ SerializableResource delegates to the adapter, which it builds as:
146146

147147
```ruby
148148
adapter_options = {}
149-
adapter = Adapter.create(serializer, adapter_options)
149+
adapter = ActiveModelSerializers::Adapter.create(serializer, adapter_options)
150150
adapter.to_json
151151
adapter.as_json
152152
adapter.serializable_hash

0 commit comments

Comments
 (0)