Skip to content

Add support for specifying custom :meta options. #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smoothcontract
Copy link

What does this PR do?

  • Currently the pagination implementation completely overwrites the response :meta options - I have a use case that requires adding additional options to the meta section but the gem doesn't support that. This change allows something like the following to work as expected:
paginate my_collection, meta: { foo: 'bar' }

...and will include the specified custom metadata in addition to the pagination metadata.

Currently the pagination implementation completely overwrites the response `:meta` options - I have a use case that requires adding additional options to the meta section but the gem doesn't support that. This change allows something like the following to work as expected:

```
paginate my_collection, meta: { foo: 'bar' }
```

And will include the specified custom metadata in addition to the pagination metadata.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant