<commit_before><%
controller ||= params[:controller]

pagination_url_params = params.merge(:controller => controller, :action => :browse, :search => params[:search], :update => 1)
prev_url = url_for(pagination_url_params.merge(:page => page.prev.number, :escape => false)) if page.prev?
next_url = url_for(pagination_url_params.merge(:page => page.next.number, :escape => false)) if page.next?
-%>
<ol>
  <li class="found"><%= rs_("%d %s found", page.pager.count,
record_select_config.model.to_s.pluralize.titleize.downcase) %></li>
  <% if page.prev? -%>
  <li class="pagination previous">
    <%= link_to_remote image_tag('record_select/previous.gif', :alt => rs_('Previous')) + " " + rs_("Previous %d",
page.pager.per_page),
                      {:url => prev_url, :method => :get},
                      {:href => prev_url} %>
  </li>
  <% end -%>
  <% page.items.each do |record| -%>
  <li class="record <%= cycle 'odd', 'even' %>" id="rs<%= record.id -%>">
    <%= render_record_in_list(record, controller) %>
  </li>
  <% end -%>
  <% if page.next? -%>
  <li class="pagination next">
    <%= link_to_remote rs_("Next %d", page.pager.per_page) + " " + image_tag('record_select/next.gif', :alt => rs_('Next')),
                        {:url => next_url, :method => :get},
                        {:href => next_url} %>
  </li>
  <% end -%>
</ol><commit_msg>support pagination with Rails 3<commit_after><%
controller ||= params[:controller]

pagination_url_params = params.merge(:controller => controller, :action => :browse, :search => params[:search], :update => 1)
prev_url = url_for(pagination_url_params.merge(:page => page.prev.number, :escape => false)) if page.prev?
next_url = url_for(pagination_url_params.merge(:page => page.next.number, :escape => false)) if page.next?
-%>
<ol>
  <li class="found"><%= rs_("%d %s found", page.pager.count,
record_select_config.model.to_s.pluralize.titleize.downcase) %></li>
  <% if page.prev? -%>
  <li class="pagination previous">
    <%= link_to image_tag('record_select/previous.gif', :alt => rs_('Previous')) + " " + rs_("Previous %d",
page.pager.per_page),
                      {:url => prev_url},
                      {:href => prev_url, :method => :get, :remote => true} %>
  </li>
  <% end -%>
  <% page.items.each do |record| -%>
  <li class="record <%= cycle 'odd', 'even' %>" id="rs<%= record.id -%>">
    <%= render_record_in_list(record, controller) %>
  </li>
  <% end -%>
  <% if page.next? -%>
  <li class="pagination next">
  <%= link_to (rs_("Next %d", page.pager.per_page) + " " + image_tag('record_select/next.gif', :alt => rs_('Next'))).html_safe,
                        {:url => next_url},
                        {:href => next_url, :method => :get, :remote => true} %>
  </li>
  <% end -%>
</ol>
{'fraction_non_alphanumeric': 0.21304974765681325, 'fraction_numerical': 0.0010814708002883922, 'mean_word_length': 3.3769716088328074, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 83, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5699695', 'n_tokens_mistral': 1022, 'n_tokens_neox': 975, 'n_words': 187}