title: How to check if a model has a certain column/attribute?
body: <p>I have a method that needs to loop through a hash and check if each key exists in a models table, otherwise it will delete the key/value.</p>
  
  <p>for example</p>
  
  <pre><code>number_hash = { :one =&gt; "one", :two =&gt; "two" }
  </code></pre>
  
  <p>and the Number table only has a :one column so :two will be deleted.</p>
  
  <p>How do I check if a model has an attribute or not?    </p>