Skip to content

Instantly share code, notes, and snippets.

@a-leung
Last active January 4, 2016 22:23
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 a-leung/cc44372f1ae776726e89 to your computer and use it in GitHub Desktop.
Save a-leung/cc44372f1ae776726e89 to your computer and use it in GitHub Desktop.
param[:attribute] = true
# model passes validation as model.attribute = true
validates :attribute, in: [true, false]
param[:attribute] = true
# model throws error as model.attribute = 'true' not: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment