-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not overwrite the database default value
When a new database record has a column that is set to its database default value, the "#{attribute}_changed?" method returns false, which causes default_value_for to overwrite the database default. This commit changes this behavior to not overwrite when the column is being set by the initialization attributes.
- Loading branch information
Reuben Pereira
committed
Aug 2, 2021
1 parent
0e96e64
commit 803523f
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters