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

[pull] master from solidusio:master #308

Merged
merged 12 commits into from
Jan 20, 2023
Merged

[pull] master from solidusio:master #308

merged 12 commits into from
Jan 20, 2023

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 18, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

waiting-for-dev and others added 4 commits January 16, 2023 06:44
We deprecated `#redirect_back_or_default` method in #4533 [1]. However,
the original plan was halted because of auth problems in
solidus_auth_devise. See solidusio/solidus_auth_devise/232 [2] for details.

[1] - #4533
[2] - solidusio/solidus_auth_devise#232
Right now, passing a string or any other thing that is not
a Hash to the searcher in the `:search` parameter will raise
a NoMethodError.

For example: `/products?per_page=&keywords=&search=blub` would raise
a NoMethodError.

This commit avoids that a generic NoMethodError is raised and instead
raise a very specific error that serves two purposes:

1. Helps debugging: the error message contains the name of the param
   that is invalid, making it easier to spot eventual issues.
2. Allows to rescue the error safely at the storefront level. For
   example, to respond with a 400, one can easily do:

   rescue_from Spree::Core::Search::Base::InvalidOptions do |error|
     raise ActionController::BadRequest.new, error.message
   end
…ion_of_redirect_back_or_default

Revert the deprecation of `#redirect_back_or_default` method
Raise a custom extension passing invalid search params
This commit changes the CI matrix a little bit:

The main tests are performed against Rails 7 vs Ruby 3.1 and 3.2.

Testing Ruby 3.1 has been added to the Rails 6.1 matrix in order
to guarantee at least one overlapping Ruby version between Rails
version. This way there's a safe path to upgrade from
Rails 6.1/Ruby 2.7 up to the latest Rails 7.0/Ruy 3.2.
elia and others added 6 commits January 18, 2023 18:26
The previous implementation was missing these fields,
which might be useless for some implementations but there's
no reason no to pass them along.
Having a default of `[]` seems more appropriate than `nil`. This will
also allow stores to concatenate onto the default value and get
automatic future additions in Solidus, whereas before, stores would
have to define the array in their decorator if the core model did not set any values.

This also applies to the deprecated whitelisted_ransackable_* as it
delegates to allowed_ransackable_*.
Provide transaction_id and source in try_void
…-attribute-class-methods-usage

Improve Ransackable attribute class methods usage
A useful scope. Usage:
- Only return available products: `available: true`; and
- Return non-available and available products: `available: false`.
…-to-product-ransackable_scopes

Add available to Product.ransackable_scopes
@pull pull bot merged commit c6050d7 into nebulab:master Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants