Rails 3: redirect_to with :remote => true

后端 未结 4 866
春和景丽
春和景丽 2020-12-20 19:20

I have a delete link that makes a remote call:

<%= link_to image_tag(\"trash.png\"), [current_user, bookcase], method:  :delete, :remote => true, confi         


        
4条回答
  •  Happy的楠姐
    2020-12-20 19:53

    I am pretty sure this code will work.

    render :js => "window.location = '/jobs/index'
    

    You can use this code in action /controller_name/action name/

提交回复
热议问题