title: Getting Paperclip::AdapterRegistry::NoHandlerError
body: <p>I am trying to create an image uploader that resizes the image and saves 3 copies of it. However I am getting a No Handler Error. Products and Pictures are two different models.</p>
  
  <p>I am using Amazon S3.</p>
  
  <p>Error:</p>
  
  <pre><code>Paperclip::AdapterRegistry::NoHandlerError in ProductsController#create
  
  No handler found for "kBOxT7q.jpg"
  </code></pre>
  
  <p>...
  A picture has these attributes</p>
  
  <pre><code>#&lt;Picture id: 1, product_id: 1, url: nil, created_at: "2014-11-12 23:32:06", 
  updated_at: "2014-11-12 23:32:06"&gt;
  </code></pre>
  
  <p>...</p>
  
  <pre><code>  raise NoHandlerError.new("No handler found for #{target.inspect}")
  </code></pre>
  
  <p>Product controller</p>
  
  <pre><code>  def create
      @product = Product.new(product_params)
      if @product.save
        if params[:images]
          params[:images].each { |image|
            @product.pictures.create(image: image)
          }
        end
        flash[:info] = "Product added"
        redirect_to dashboard_path
      else
        render 'new'
      end
    end
    private
  
    def product_params
      params.require(:product).permit(..., images_attributes: [:name])
    end
  </code></pre>
  
  <p>Picture.rb</p>
  
  <pre><code>class Picture &lt; ActiveRecord::Base
    belongs_to :product
  
    # This method associates the attribute ":avatar" with a file attachment
    has_attached_file :image, styles: {
      thumb: '100x100&gt;',
      square: '200x200#',
      medium: '400x400&gt;'
    }
  
    validates_attachment :image, content_type: {
      content_type: ["image/jpg", "image/png", "image/jpeg"]
    }
  end
  </code></pre>
  
  <p>Product Model</p>
  
  <pre><code>class Product &lt; ActiveRecord::Base
    has_many :pictures, dependent: :destroy
    accepts_nested_attributes_for :pictures
  </code></pre>
  
  <p>View</p>
  
  <pre><code>&lt;%= form_for(@product) do |f| %&gt;
    &lt;div class="control-group"&gt;
      &lt;%= f.label :pictures, :class =&gt; 'control-label' %&gt;
      &lt;div class="controls"&gt;
        &lt;%= file_field_tag "images[]", type: :file, multiple: true %&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    ...
  &lt;% end %&gt;
  </code></pre>
  
  <h1>debug output</h1>
  
  <p>Request</p>
  
  <pre><code>Parameters:
  {"utf8"=&gt;"✓",
   "authenticity_token"=&gt;"kPbpAg5dr4nbl9k2qt7hQ+BDPHZEHGPmImuxxYMxXpI=",
   "product"=&gt;{"name"=&gt;"aaah",
   "price"=&gt;"1.00",
   "category"=&gt;"1",
   "quantity"=&gt;"2",
   "shop_id"=&gt;"1"},
   "images"=&gt;["kBOxT7q.jpg",
   "ZBBukdp.jpg"],
   "commit"=&gt;"Add Product"}
  </code></pre>