Plug-in not working for update call, converting PUT request to POST request automatically in Rails

Plug-in not working for update call, converting PUT request to POST request automatically in Rails

DreamrulezDreamrulez Posts: 2Questions: 0Answers: 0
edited May 2013 in Bug reports
I'm using the Plug-in for a form within a Table
The form works perfectly for Creating (POST) the post. But, when I try to update the post's information using the same form within the table, it returns me a routing error:

No route matches [POST] "/posts/1"

For Update the call should have been PUT but it is using POST here. It only happens when I use the plug-in otherwise the Update is working fine. Please look into the following matter.

Replies

  • allanallan Posts: 63,683Questions: 1Answers: 10,498 Site admin
    Which plug-in is it you are using? If Editor, a PUT request absolutely should be possible using the `ajax` options. Could you show use your initialisation please?

    Thanks,
    Allan
  • DreamrulezDreamrulez Posts: 2Questions: 0Answers: 0
    I am using these files from Datatables.zip:
    jquery.dataTables.js
    demo-table.css
    /media/images folder

    $(function() {
    $('#shares').dataTable( {
    "sPaginationType": "full_numbers",
    "bJQueryUI": true
    });
    });

    Basically I'm following this tutorial : http://www.jacoulter.com/2012/01/03/rails-spice-up-your-tables-with-datatables/
  • allanallan Posts: 63,683Questions: 1Answers: 10,498 Site admin
    I don't immediately see the Javascript that is being used for the create, edit delete there, but it doesn't look like code that is part of DataTables, so probably not something I can help with.

    Allan
This discussion has been closed.