Using turbolinks in a Rails link_to

前端 未结 6 1228
臣服心动
臣服心动 2020-11-29 03:14

Just wondering whether there\'s a way to use turbolinks directly in a rails link_to helper, a quick bit of googling didn\'t uncover anything of note, here\'s the type of thi

6条回答
  •  自闭症患者
    2020-11-29 03:55

    Turbolinks 5 uses a slightly different syntax

    <%= link_to "Foo", new_foo_path(@foo), data: { turbolinks: false } %>
    

    Source: Turbolinks Github Page

提交回复
热议问题