-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update Spree::Product scopes.rb to fix issue with 'descend_by_popularity' scope #4969
Conversation
Thanks, @cmbaldwin 🙌 Would you mind adding a regression test for that? 🙏 |
Fixes issue with 'disallow_raw_sql!': Query method called with non-attribute argument we need to use build in Arel.sql method Regression test for descend_by_popularity
I'm a novice at this, like I'm just learning rspec, is this acceptable? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!!
Just for reference, this PR is making the test suite fail pretty consistently: https://app.circleci.com/pipelines/github/solidusio/solidus/4165/workflows/08e29e14-a001-406a-a924-be5443af3cf1/jobs/39599. @cmbaldwin Do you want to take a look at it? |
@cmbaldwin I think I have a fix with #4979. |
Thanks! Sorry I was a bit busy with other things last week, didn't show up on my radar until just now. I learned a bit from your fix, setting specific variables instead of 'let' and the create_list method. Cheers :) |
Fixes issue "'disallow_raw_sql!': Query method called with non-attribute argument" for the Spree::Product scope 'descend_by_popularity'. Uses the Arel.sql method to build sanitized SQL.
Fixes #4968
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: