Rails form_for :remote=>true is not calling js method

前端 未结 7 1740
感情败类
感情败类 2020-12-01 09:11

I have no idea why this is not working, I\'m learning rails and I\'m following a book it says to do it like this:

    <%= form_for([@article,@article.comm         


        
7条回答
  •  广开言路
    2020-12-01 09:57

    If you have a file_field then it submits as html, even when remote: true - took me a long time to work that out so I am adding this answer to maybe save someone else time, there is a solution, use the remotipart gem, see the answer here

提交回复
热议问题