Created
July 30, 2017 04:23
-
-
Save kalmanh/3eb8370fc15d016f2e44e57a64b8ed11 to your computer and use it in GitHub Desktop.
Example of inclusion 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 Car < ActiveRecord::Base | |
validates :color, inclusion: { in: [ "green", "red", "None" ] } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment