Create helper to set blank attributes to nil before validation
Uses a before_validation callback to set configured attributes to nil if they have a truthy response to #blank?, which helps prevent empty strings ending up in the database.
Showing
Please register or sign in to comment