简体   繁体   中英

confirmation for link_to not working rails 4

I have the following code-

<td><%= link_to "", {:controller => :daily_work_updates, :action => :deleteValue, :id => a.UPDATE_ID}, data: {confirm: "Are you sure?"} , :class=>'glyphicon glyphicon-trash'%></td>

When I click on the link. The action is successfully done but the confirmation pop up does not show for some reason. I have looked up similar questions but none have seemed to help me.

I am using rails 4.

Figured it out. I was missing the Unobtrusive scripting adapter for jQuery (jquery_ujs) in my application.js

//= require jquery_ujs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM