[Rails5] Avoid type casting in uniqueness validator
What does this MR do?
This MR does two things:
- Synchronizes
Gemfile.rails5.lock
with the latest changes inGemfile
. - Adds a monkey patch for active record to avoid type casting in uniqueness validator.
In Rails 5.0 there was introduced a bug that causes to problems like this:
1) API::Users POST /user/:id/gpg_keys/:key_id/revoke when authenticated revokes existing key
Failure/Error: let(:gpg_key) { create(:gpg_key, user: user) }
TypeError:
can't cast Hash
This bug was fixed in Rails 5.1.
Are there points in the code the reviewer needs to double check?
No.
Why was this MR needed?
Migration to Rails 5.0.
Screenshots (if relevant)
No.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)