diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-05-31 20:32:36 +0200 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-05-31 20:32:36 +0200 |
commit | cf87c3be18a8dfb6c31d549d35d6d2c07517df1d (patch) | |
tree | 2dbd29a579b202fba4c00cb0dc4da709a4a14baa /tmp/prometheus_multiproc_dir | |
parent | e57ad62d488b15b9e65ea63f4ab78e51336318a5 (diff) | |
download | gitlab-ce-rails5-enum-nil.tar.gz |
Enable mapping to nil in enumsrails5-enum-nil
Enum in Rails 5 does not map nil values - IOW nil value remains nil,
even if there is a key with nil value in the enum definition.
This commit overrides the underlying Enum methods so nil value is
still mapped. This solution is far from being ideal: it uses dynamic
definition of methods which introduces more magic/confusion
into the codebase.
It would be better to get rid of the nil value in enums.
Diffstat (limited to 'tmp/prometheus_multiproc_dir')
0 files changed, 0 insertions, 0 deletions