title: How would I check if a value is found in an array of values
body: <p>I want to perform an if condition where, if <code>linkedpub.LPU_ID</code> is found in an array of values(<code>@associated_linked_pub</code>), do some action.</p>
  
  <p>I tried the following but the syntax is not correct.</p>
  
  <p>Any suggestion is most welcomed..Thanks a lot</p>
  
  <pre><code>&lt;% for linkedpub in Linkedpub.find(:all) %&gt;
     &lt;% if linkedpub.LPU_ID IN @associated_linked_pub  %&gt;
         # do action
     &lt;%end%&gt;
  &lt;%end%&gt;
  </code></pre>