i am create scaffolding using Rails. This is my index page
<%- model_class = Tasktodo -%>
<div class="page-header">
<h1><%=t 'title', :default => model_class.model_name.human.pluralize %></h1>
</div>
<table class="table table-striped">
<thread>
<tr>
<th><%= model_class.human_attribute_name(:id) %></th>
<th><%= model_class.human_attribute_name(:name) %></th>
<th><%= model_class.human_attribute_name(:tname) %></th>
<th><%= model_class.human_attribute_name(:created_at) %></th>
<th><%=t '.actions', :default => t("helpers.actions") %></th>
</tr>
</thead>
<tbody>
<div id="edit">
<% @tasktodos.each do |tasktodo| %>
<tr>
<td><%= link_to tasktodo.id, tasktodo_path(tasktodo) %></td>
<td><a href="#" onclick="inedit()" style="text-decoration:none"><%= tasktodo.name %></a></td>
<td><%= tasktodo.tname %></td>
<td><%=l tasktodo.created_at %></td>
<td>
</div>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
edit_tasktodo_path(tasktodo), :class => 'btn btn-mini' %>
If i clicked Edit button means.it will be go to edit page like next page.. now i want to do operation without server hit.means don't go nextpage when i clicked. all operation should be done in same page only. using Ajax,how can i do this operation.?