forked from collectiveidea/clear_empty_attributes
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
4 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ClearEmptyAttributes | ||
==================== | ||
When AR objects are saved from a form, empty fields are saved as empty | ||
strings instead of nil. This kills most validations. | ||
|
||
Description goes here | ||
This plugin simple defines a before_validation callback that sets empty attributes to nil. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
|
||
When AR objects are saved from a form, empty fields are saved as empty | ||
strings instead of nil. This kills most validations. | ||
require 'clear_empty_attributes' |