Remove allows_nil: false setting in default_value_for
The default_value_for gem uses the `<column>_changed?` method to determine if the default value should be applied. For new records, the `<column>_changed?` method returns false if the value of the column is the same as the database default. One workaround is to remove the `allows_nil: false` in the `default_value_for` setting for container_registry_access_level so that default_value_for does not overwrite the database default value. This bug should be fixed by https://github.com/FooBarWidget/default_value_for/pull/90. The container_registry_access_level column has a null: false constraint, so removing the allows_nil: false from the default_value_for should not be a problem.
Showing
Please register or sign in to comment