<%= render :partial => 'admin_data/search/search/title', :locals => {
                                                         :records => @records,
                                                         :total_num_of_children => @total_num_of_children } %>

<div class="pagination">
  <%= will_paginate @records, :container => false, :params => {:klass => klass.name} %>
</div>
<div class='clear'></div>

<table cellspacing="3" cellpadding="3" id="view_table" class='table colorize'>

  <thead>
     <tr>
      <% columns_order(klass).each do |column| %>
        <th> <%= column_title(klass, column) %> </th>
      <% end %>
    </tr>
  </thead>

  <tbody>
  <% @records.each do |record| %>
    <tr>
      <% columns_order(klass).each do |column| %>
        <td>
          <% if (column == klass.primary_key) %>
            <%= link_to(record.to_param.to_s, admin_data_path(:klass => klass.name.underscore, :id => record)) %>
         <% else %>
            <%=h get_value_for_column(column_native(klass, column), record) %>
          <% end %>
        </td>
      <% end %>
    </tr>
  <% end %>
  </tbody>
</table>

<div class="pagination">
  <%= will_paginate @records, :container => false, :params => {:klass => klass.name.underscore} %>
</div>

<div class='clear'></div>

<%= render :partial => 'admin_data/search/search/title', :locals => {
                                                         :records => @records,
                                                         :total_num_of_children => @total_num_of_children } %>

<div class="pagination">
  <%= will_paginate @records, :container => false, :params => {:klass => klass.name} %>
</div>
<div class='clear'></div>

<table cellspacing="3" cellpadding="3" id="view_table" class='table colorize'>

  <thead>
     <tr>
      <% columns_order(klass).each do |column| %>
        <th> <%= column_title(klass, column) %> </th>
      <% end %>
    </tr>
  </thead>

  <tbody>
  <% @records.each do |record| %>
    <tr>
      <% columns_order(klass).each do |column| %>
        <td>
          <% if (column == klass.primary_key) %>
            <%= link_to(record.to_param.to_s, admin_data_path(:klass => klass.name.underscore, :id => record.id)) %>
         <% else %>
            <%=h get_value_for_column(column_native(klass, column), record) %>
          <% end %>
        </td>
      <% end %>
    </tr>
  <% end %>
  </tbody>
</table>

<div class="pagination">
  <%= will_paginate @records, :container => false, :params => {:klass => klass.name.underscore} %>
</div>

<div class='clear'></div>

Fix routing error when viewing certain pages caused by id paramter being pass record object instead of record id
Fix routing error when viewing certain pages caused by id paramter being pass record object instead of record id
