diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-05-31 20:32:36 +0200 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-06-06 20:46:54 +0200 |
commit | 0665a8f730e19e180f2b4d240ca7e93408d61b12 (patch) | |
tree | daaaecc755f15629c9e28eeaeb0e15dd2a6654ec /Gemfile.lock | |
parent | 41eab9a90787162ee338fd2e3a81827a9bc923c3 (diff) | |
download | gitlab-ce-0665a8f730e19e180f2b4d240ca7e93408d61b12.tar.gz |
Enable mapping to nil in enums
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 'Gemfile.lock')
0 files changed, 0 insertions, 0 deletions