Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make dependency on Rails > 6.1 explicit
There's at least one part of the extension that is not compatible with Rails < 6.1. The `ActiveModel::Errors` handling maps the error collection assuming that what is yielded is an instance of `ActiveModel::Error` (call to `error.attribute`): https://github.com/solidusio-contrib/solidus_graphql_api/blob/9629e8d6b5ee5767265c3e1068a13b2677430a98/lib/solidus_graphql_api/mutations/base_mutation.rb#L36-L41 However, the [`ActiveModel::Error` object is only available from Rails 6.1](https://guides.rubyonrails.org/6_1_release_notes.html#active-model-notable-changes), and before that [it was yielded the error key and message](https://api.rubyonrails.org/v6.0.0/classes/ActiveModel/Errors.html#method-i-each). We also bump the minimal requirement for Solidus to 2.10, as it's the first version that [supported Rails 6.1](https://rubygems.org/gems/solidus_core/versions/2.10.0) (last [2.9 version didn't support it](https://rubygems.org/gems/solidus_core/versions/2.9.6)).
- Loading branch information