JangoSteve / remotipart

Rails jQuery file uploads via standard Rails "remote: true" forms.
http://os.alfajango.com/remotipart
Other
1k stars 215 forks source link

No route matches [POST] #150

Closed Frank004 closed 7 years ago

Frank004 commented 8 years ago

Hi this my form and im getting this error

    <%= bootstrap_form_for inspection_component, html: { multipart: true, remote: true, method: :put} do |f| %>
    <%= f.select(:score, score_values, { :class => "form-control",label:"Puntuación" }) %>
    <%= f.text_area :comment, label:"Comentarios"%>
    <%= f.file_field :photo, hide_label: true %>
      <%= f.submit 'Guardar', class: "btn btn-success" %>
    <%end%>

 def update
   respond_to do |format|
      format.json {}
      format.js {}  
  end
end

ActionController::RoutingError (No route matches [POST] "/inspection_components/10622"):
Shwetakale commented 8 years ago

@Frank004 are your other PUT requests working? If not then this could be issue with jquery_ujs loading. Because on form you are specifying method as put but on server it's going as post.

Check if your application.js has following line

//= require jquery_ujs

Hope this helps.

Frank004 commented 7 years ago

It was another gem adding the jqueryFileUpload

this the solution to my problem #69