Ruby on Rails: Sending javascript data to ruby controller

后端 未结 3 1573
野性不改
野性不改 2021-01-24 02:22

I would like to send a javascript array to be processed by a method in my controller. I think I am doing this way wrong. I am a total RoR, jquery, and ajax noobie. Here is what

3条回答
  •  醉梦人生
    2021-01-24 02:38

    Since you want it to respond in AJAX, you can tell Rails not to render anything by adding

    render :layout => false
    

    to the controller action

提交回复
热议问题