Created
February 4, 2009 22:02
-
-
Save randyjhunt/58367 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # you can trap for nil entries in validations and validations are simple | |
| # you can always test it with .blank? | |
| # you can always convert nil values to empty strings by simply | |
| # adding .to_s | |
| # i.e. | |
| test = User.new | |
| test.name | |
| => nil | |
| test.name.to_s | |
| => "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment