Commit Graph

2 Commits

Author SHA1 Message Date
Jan Provaznik 1b42c847bc Fix rails 5 deprecation warnings
Fixes rails 5 deprecation warnings in `config/` files
2018-09-11 18:14:37 +02:00
blackst0ne ddcce35c28 [Rails5] Avoid type casting in uniqueness validator
This commit does two things:
1. Synchronizes `Gemfile.rails5.lock` with the latest changes in `Gemfile`
2. Adds a monkey patch for active record to avoid type casting in uniqueness
validator.

In Rails 5.0 there was introduced a bug [1] 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 [2].

[1]: 811a4fa8eb
[2]: aa062318c4
2018-04-19 13:31:11 +11:00