Created
December 12, 2012 17:21
-
-
Save shanemcd/4269738 to your computer and use it in GitHub Desktop.
Require all (most) fields in Rails model
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
validates_presence_of(self.column_names - ["id", "created_at", "updated_at"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment