title: rails validate in model that value is inside array
body: <p>I have a form where i pass a <strong>field named</strong> <code>:type</code> and i want to <strong>check if it's value is inside an array of allowed types</strong> so that <strong>no one is allowed to post not-allowed types</strong>.</p>
  
  <p>the array looks like</p>
  
  <pre><code>@allowed_types = [
     'type1',
     'type2',
     'type3',
     'type4',
     'type5',
     'type6',
     'type7',
     etc...
  ]
  </code></pre>
  
  <p>i have <strong>tried using</strong> <code>validates_exclusion_of</code> or <code>validates_inclusion_of</code> but it doesn't seem to work</p>