The `default_value_for` gem doesn't handle `ActionController::Parameters` correctly
As shown in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23102, there is an issue where the value of external
isn't respected when passed to User.new
.
The issue only occurs in Rails 5 and only for attributes that are using default_value_for
(from the https://github.com/FooBarWidget/default_value_for gem).
The issue is a https://github.com/FooBarWidget/default_value_for issue and has been reported at https://github.com/FooBarWidget/default_value_for/issues/69 and a fix has been provided at https://github.com/FooBarWidget/default_value_for/pull/70 (still not merged).
The problem is that default_value_for
doesn't handle correctly ActionController::Parameters
now that it no longer inherits from Hash
. Since this doesn't seem like it will be fixed upstream anytime soon, we should fork the gem and release a new version with the fix.