Topic: Insert HTML w/ will paginate

I'm working on finishing up my first rails app. But I came across an issue. In which the JS.insert_html will not update properly.

    @site = Site.find(params[:id]) 
    @pages = @site.pages.order(sort_column + " " + sort_direction).paginate(:per_page => 2, :page => params[:page])

my _page.html.erb

<% @pages.each_with_index do |page, i| %>
  <tr <%= 'class=trAlt' if i%2==0 %>>
    <td> <%=link_to truncate(page.url.reverse, :length =>45).reverse, page.url, :target => "_blank" %> </td>
    <td><%= page.status %></td>
  <% end %>

my rjs pag

page.insert_html :bottom, 'page_listing', :partial => 'page'

My error:

ActionView::Template::Error (You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each_with_index):

So I think that because I'm calling in @pages = @site that is my error. But I don't really know how to fix this, some help please