ruby on rails - link_to tag is being called with my project -


<div class="container-fluid" id="manage"> <h2>managing users</h2>  <table>     <tr>         <td></td>         <td><%= link_to "add user", users_new_path, method: :get, class: "btn btn-primary" %> <br />  <!--  go add-user-page  --></td>     </tr>     <tr>         <td><button class="btn btn-danger navbar-btn"> emails</button><br /></td>         <td><button class="btn btn-danger navbar-btn"> delete</button><br /></td>     </tr>      <% @users.each |user| %>       <tr>         <td><button class="btn btn-info"><%= user.email %></button></td>         <td><%= link_to "del", users_delete_path(id: user.id), method: :delete ,class: "btn btn-info", data: { confirm: "you sure?" }%></td>       </tr>      <% end %>  </table>   </div> 

in file, delete action , new action called twice. tried according stack answers( link_to :confirm displays popup twice why ruby on rails link_to sending action twice?. , etc)

who can me?

edited - application.js

//= require jquery //= require bootstrap-sprockets //= require jquery_ujs //= require rails-ujs //= require turbolinks //= require_tree . 

the simplest solution remove //require rails-ujs line.

//= require jquery //= require bootstrap-sprockets //= require jquery_ujs //= require turbolinks //= require_tree . 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -