load partial with jquery and rails

后端 未结 5 1366
深忆病人
深忆病人 2021-01-04 23:54

Im curious about what the best way to load a rails partial with jquery. So far I have tried a solution not working:

$(\'#imagecontent\').load(\'/newsletters/         


        
5条回答
  •  执念已碎
    2021-01-05 00:05

    Another alternative:

    $('#imagecontent').html('<%= escape_javascript render 'newsletters/image_gallery' %>');
    

提交回复
热议问题