title: Rails 3.2 Nested Form Custom Foreign Key Unable to Save
body: <p>I have this Reviews Model:</p>
  
  <pre><code>class Review &lt; ActiveRecord::Base
    attr_accessible :approved, :reviewed_id, :for, :user_id, :text, :rating, :title
  
    belongs_to :business
    belongs_to :product
  end
  </code></pre>
  
  <p>and this Product model:</p>
  
  <pre><code>class Product &lt; ActiveRecord::Base
    include ApplicationHelper
    belongs_to :business
    belongs_to :catalog
    belongs_to :category
  
    has_many :reviews, :foreign_key =&gt; :reviewed_id
    has_many :features, :dependent =&gt; :destroy
  end
  </code></pre>
  
  <p>and this Business model:</p>
  
  <pre><code>class Business &lt; ActiveRecord::Base
    validates_presence_of :name
    validates_presence_of :category
  
    mount_uploader :photo, PhotoUploader
  
    has_many :catalogs, :dependent =&gt; :destroy
    has_many :products, :dependent =&gt; :destroy
    has_many :branches, :dependent =&gt; :destroy
    has_many :reviews, :foreign_key =&gt; :reviewed_id
  end
  </code></pre>
  
  <p>but with this create action in the Reviews controller:</p>
  
  <pre><code>def create
    @business = Business.find(params[:business_id])
  
    if params.has_key?('product_id')
      @product = Product.find(params[:product_id])
      @review = @product.reviews.build(params[:review])
  
      if @review.save
        flash[:notice] = 'Pending Review Submitted'
        redirect_to business_product_path(@business, @product)
      else
        @form_resources = [@business, @product, @review]
        respond_with(@business, @product, @review)
      end
    else
      @review = @business.reviews.build(params[:review])
  
      if @review.save
        flash[:notice] = 'Pending Review Submitted'
        redirect_to business_path(@business)
      else
        @form_resources = [@business, @review]
        respond_with(@business, @review)
      end
    end
  end
  </code></pre>
  
  <p>I can't save the association. simple_form says there is an error, but I can't see the error in my logs, and all the other fields are validated so I'm guessing there is a problem with the association.</p>
  
  <p><strong>SIDE QUESTION:</strong> how can you I make simple_form show all errors?</p>