Define your partial

_next_prev_nav.erb

<ul class="pager">
  <li class="previous">
    <%= link_to "&larr; Previous".html_safe, prev_url  %>
  </li>
  <li class="next">
    <%= link_to "Next &rarr;".html_safe, next_url  %>
  </li>
</ul>

You can see here prev_url and next_url are variables that I want to pass values to when I call this partial.

Then call it like this:

          <%= render 'shared/next_prev_nav', :prev_url => "http://foo.com", :next_url => "http://bar.com" %>