Ruby on Rails - validates inclusion of an attribute in ruby on rails- ruby on rails tutorial - rails guides - rails tutorial - ruby rails
Example
- We can check if a value is included in an array using the inclusion: helper.
- The :in option and its alias, :within show the set of acceptable values.
- To check if a value is not included in an array.
- Using the exclusion:.