title: CarrierWave and nested forms saving empty image object if photo :title is included in form
body: <p>I'm after some advice in regards to handling nested form data and I would be ever so grateful for any insights.</p>
  
  <p>The trouble is I'm not 100% sure why I require the following code in my model</p>
  
  <pre><code>  accepts_nested_attributes_for :holiday_image, allow_destroy: true, :reject_if =&gt; lambda { |a| a[:title].blank? }
  </code></pre>
  
  <p>I don't understand why I require to tact on on my accepts_nested_attributes_for association:</p>
  
  <pre><code>:reject_if =&gt; lambda { |a| a[:title].blank? }
  </code></pre>
  
  <p>If I remove this :reject_if lambda, it will save a blank holiday photo object in the database. I presume because it takes the :title field from the form as an empty string? </p>
  
  <p>I guess my question is, am I doing this right or is there a better way of this this within nested forms if I want to extend my HolidayImage model to include more strings like description, notes?</p>
  
  <p>Sorry If I couldn't be more succinct.  </p>
  
  <p>My simple holiday app.</p>
  
  <pre><code># holiday.rb 
  class Holiday &lt; ActiveRecord::Base
    has_many :holiday_image
    accepts_nested_attributes_for :holiday_image, allow_destroy: true, :reject_if =&gt; lambda { |a| a[:title].blank? }
  
    attr_accessible :name, :content, :holiday_image_attributes
  
  end
  </code></pre>
  
  <p>I'm using CarrierWave for image uploads.</p>
  
  <pre><code># holiday_image.rb 
  class HolidayImage &lt; ActiveRecord::Base
    belongs_to :holiday
    attr_accessible :holiday_id, :image, :title
  
    mount_uploader :image, ImageUploader
  end
  </code></pre>
  
  <p>Inside my _form partial there is a field_for block</p>
  
  <pre><code>&lt;h3&gt;Photo gallery&lt;/h3&gt;
  &lt;%= f.fields_for :holiday_image do |holiday_image| %&gt;
  &lt;% if holiday_image.object.new_record? %&gt;
  
    &lt;%= holiday_image.label :title, "Image Title" %&gt;
    &lt;%= holiday_image.text_field :title %&gt;
    &lt;%= holiday_image.file_field :image %&gt;
  
  &lt;% else %&gt;
  
    Title: &lt;%= holiday_image.object.title %&gt;
    &lt;%= image_tag(holiday_image.object.image.url(:thumb)) %&gt;
    Tick to delete: &lt;%= holiday_image.check_box :_destroy %&gt;
  
  &lt;% end %&gt;
  </code></pre>
  
  <p>Thanks again for your patience.</p>