Skip to content

Commit 17bd397

Browse files
committed
Document ResourceControllerMetal
1 parent 1bbf3e4 commit 17bd397

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,22 @@ A jsonapi-controller generator is avaliable
11711171
rails generate jsonapi:controller contact
11721172
```
11731173
1174+
###### ResourceControllerMetal
1175+
1176+
`JSONAPI::Resources` also provides an alternative class to `ResourceController` called `ResourceControllerMetal`.
1177+
In order to provide a lighter weight controller option this strips the controller down to just the classes needed
1178+
to work with `JSONAPI::Resources`.
1179+
1180+
For example:
1181+
1182+
```ruby
1183+
class PeopleController < JSONAPI::ResourceControllerMetal
1184+
1185+
end
1186+
```
1187+
1188+
Note: This may not provide all of the expected controller capabilities if you are using additional gems such as DoorKeeper.
1189+
11741190
###### Serialization Options
11751191
11761192
Additional options can be passed to the serializer using the `serialization_options` method.

0 commit comments

Comments
 (0)