title: Rails/Ruby - How to check if an attr_accessor field exists?
body: <p>In Rails 3/4 model, if a field <code>field1</code> is declared with <code>attr_accessor</code>:</p>
  
  <pre><code>attr_accessor :field1
  </code></pre>
  
  <p>How to check late on if <code>field1</code> exists in the model?. <code>column_exists?</code> and <code>method_defined?</code> seem only working with model column and <code>field1</code> is not a model column.</p>