Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,14 @@ JSONAPI.configure do |config|
end
```

To use a specific `OperationsProcessor` in a `ResourceController`, override the `create_operations_processor` method:

```ruby
def create_operations_processor
CountingActiveRecordOperationsProcessor.new
end
```

The callback code will be called after each find. It will use the same options as the find operation, without the
pagination, to collect the record count. This is stored in the `operation_meta`, which will be returned in the top level
meta element.
Expand Down