Skip to content
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

Tweak Rails 5 code to support LIMIT/OFFSET #6

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

Conversation

jakeonrails
Copy link

When LIMIT/OFFSET are used in a query, extract_value replaces their values with nil since the values in the query array are of type ActiveModel::Attribute::WithCastValue not ActiveRecord::Relation::QueryAttribute. I've updated the method to ask if the objects have a value method and to always call it if they do instead of querying their types.

@bradurani

This comment was marked as resolved.

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.

2 participants