Skip to content

Instantly share code, notes, and snippets.

@adamdilek
Created April 2, 2013 07:28
Show Gist options
  • Select an option

  • Save adamdilek/5290527 to your computer and use it in GitHub Desktop.

Select an option

Save adamdilek/5290527 to your computer and use it in GitHub Desktop.
Rails 4 absence validation
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