I created a simple rails app: :~ rails generate scaffold User name:string email:string :~ rake db:migrate and then edited _form.html.erb for using the DataTable Plugin:
<table id="users" class="display">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Update</th>
</tr>
</thead>
<tbody>
<tr>
<%= form_for(@user) do |f| %>
<% if @user.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
<ul>
<% @user.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<td><div class="field">
<%= f.label :name %><br />
<%= f.text_field :name %>
</div></td>
<td><div class="field">
<%= f.label :email %><br />
<%= f.text_field :email %>
</div></td>
<td><div class="actions">
<%= f.submit %>
</div></td>
<% end %>
</tr>
</tbody>
</table>
The form works completely well when a User is created. But, when i try update User's information it returns me a routing error: No route matches [POST] "/users/1"
For Update the call should have been PUT but it is using POST here. It only happens when I use the Gem otherwise the Update is working fine. Please look into the following matter.
Issue Link :here