title: Rails 3: Why the field with error is not wrapped with "field_with_errors" div when validation fails?
body: <p>My <code>Product</code> class has <code>price</code> field, which has an appropriate column in <code>Products</code> table in the database, and <code>new_shop</code> helper field (which is defined as <code>attr_accessor</code>, and does not has an appropriate column in <code>Products</code> table in the database).</p>
  
  <p>When validation on <code>price</code> fails, the input field is wrapped with <code>field_with_errors</code> div, but when the validation on <code>new_shop</code> fails, it is not wrapped with <code>field_with_errors</code> div. Why ?</p>
  
  <p>Here is the generated HTML for these input fields:</p>
  
  <pre><code>&lt;input type="text" name="product[price]" id="product_price"&gt;
  &lt;input type="text" value="" name="product[new_shop]" id="product_new_shop"&gt;
  </code></pre>
  
  <hr>
  
  <p>Some more info:</p>
  
  <pre><code>class Product &lt; ActiveRecord::Base
    attr_accessor :new_shop 
    accepts_nested_attributes_for :shop
    validates_presence_of :price
    ...
  end
  
  class Shop &lt; ActiveRecord::Base
    validates_presence_of :name
    ...
  end
  </code></pre>
  
  <p>When the form is submitted, the <code>new_shop</code> value is passed to product's <code>shop_attributes[:name]</code>.</p>