Created
April 2, 2013 07:28
-
-
Save adamdilek/5290527 to your computer and use it in GitHub Desktop.
Rails 4 absence validation
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
| class SuperHero | |
| include ActiveModel::Validations | |
| attr_accessor :secret_identity | |
| validates :secret_identity, absence: true | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment