Skip to content

Instantly share code, notes, and snippets.

@shanemcd
Created December 12, 2012 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shanemcd/4269738 to your computer and use it in GitHub Desktop.
Save shanemcd/4269738 to your computer and use it in GitHub Desktop.
Require all (most) fields in Rails model
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