Parser error when using jQuery-UJS for remote link_to in Rails 3 app: how can I debug this?

后端 未结 7 1947
刺人心
刺人心 2021-02-14 12:55

I\'m trying to replace the content of a div after clicking on a link using Rails 3, remote_link :remote => true and jQuery.

So far, I\'ve been able to ge

7条回答
  •  梦如初夏
    2021-02-14 13:52

    The solution for me was to also replace the response format with '.html' instead of '.js' in the controller.

    What it does is send the response content type as "html/text" instead of "html/javascript", and this, is somehow acceptable to the response parser.

提交回复
热议问题