Paperclip error

Ciao ragazzi ho un form con 4 attachment file;
Eseguo il form con ajaxForm passando i dati in JSON, fin qui tutto bene,
se eventualmente non voglio caricare l’immagini(attach), paeprclip mi da
questo errore:

Paperclip::AdapterRegistry::NoHandlerError
No handler found for “”

il mio form è questo:

<%= form_for @showcase, :html => { :multipart => true, class:
“form-horizontal sidebar-form”, :role => ‘form’ } do |f| %>
<%= f.hidden_field :id %>
<%= f.hidden_field :published, :value => true %>
<%= f.hidden_field :shop_id, :value => current_user.shop.id %>
<%= f.text_field :title, {:class => ‘form-control
sidebar-form-input’, :id =>‘showcases_title’, :placeholder => ‘|Nome del
prodotto’} %>
<%= f.text_field :price, {:class => ‘form-control
sidebar-form-input’, :id =>‘showcases_price’, :placeholder => ‘|Prezzo’}
%>
<%= f.text_area :description, {:class => ‘form-control
sidebar-form-input-textarea’, :id =>‘showcases_descr’, :placeholder =>
‘|Descrizione del prodotto’, :style =>“height: 160px;”} %>
<%= f.file_field :photo, {:class => ‘filestyle’, :id
=>‘showcases_photo’, :placeholder => ‘immagine’, :data =>
‘classButton=“btn btn-default sidebar-form-input-file”’} %>
<%= f.file_field :photo1, {:class => ‘filestyle’, :id
=>‘showcases_photo_1’, :placeholder => ‘immagine’, :data =>
‘classButton=“btn btn-default sidebar-form-input-file”’} %>
<%= f.file_field :photo2, {:class => ‘filestyle’, :id
=>‘showcases_photo_2’, :placeholder => ‘immagine’, :data =>
‘classButton=“btn btn-default sidebar-form-input-file”’} %>
<%= f.file_field :photo3, {:class => ‘filestyle’, :id
=>‘showcases_photo_3’, :placeholder => ‘immagine’, :data =>
‘classButton=“btn btn-default sidebar-form-input-file”’} %>
<%= f.file_field :photo4, {:class => ‘filestyle’, :id
=>‘showcases_photo_4’, :placeholder => ‘immagine’, :data =>
‘classButton=“btn btn-default sidebar-form-input-file”’} %>
<%= f.text_area :detail, {:class => ‘form-control
sidebar-form-input-textarea’, :id =>‘showcases_detail’, :placeholder =>
‘|Dettaglio del prodotto’, :style =>“height: 160px;”} %>
<% end %>

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs