forked from thoughtbot/paperclip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@wip Fixed bug where processing occurs on invalid objects
- Because the processors were called on assignment, instead of during saving, the validations could never work correctly. This is because the built in validations use the values in the db columns to operate. However, since these are populated on assignment, the validations cannot run before the processors run. Moreover, any other type of validation not dependent on the db columns also cannot run, because the processors are called on assignment. The processors should be called during save which allows for validations to occur. - Fixed tests that assert the incorrect behavior - Closes thoughtbot#2462, Closes thoughtbot#2321, Closes thoughtbot#2236, Closes thoughtbot#2178, Closes thoughtbot#1960, Closes thoughtbot#2204
- Loading branch information
Showing
3 changed files
with
107 additions
and
17 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
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