3
4

More than 5 years have passed since last update.

Rails4のMountable Engineで、link_toに:method => 'delete'を指定しても、Getアクセスになってしまう

Last updated at Posted at 2016-01-15

環境

  • Ruby 2.2.3
  • Rails 4.2.4

問題点

rails4のMountable Engineで、link_toに:method => 'delete'を設定しても、何故かGETアクセスになってしまう。

[Mountable Engineの設定手順はこちら]
http://qiita.com/Esfahan/items/7a0e9a3df28d68905a6e

解決策

Engine内にある、application.jsに下記を追記すればOKでした。

{engine_name}/app/assets/javascripts/{engine_name}/application.js
//= require jquery
//= require jquery_ujs

[参考]
http://stackoverflow.com/questions/18154916/rails-4-link-to-destroy-not-working-in-getting-started-tutorial

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4