Application wide partial

Phillip,

  > I want to pull this out now into a place any view can use.

The standard way it to move your partial to a "shared" directory

   ../views/shared/_your_partial.rhtml

, and then in your controllers:    render :partial => "shared/your_partial"

> , and then in your controllers: > render :partial => "shared/your_partial" My bigger question is how to pass the variables to it and have it

The standard way, with :     :locals => {:var1=> value, ..}

See:   Peak Obsession

Phillip,

(I don't use the Rails' paginator; I wrote my own one.)

<% if @page_links.page_count > 1 %>

=> error message : You have a nil object when you didn't expect it! The error occurred while evaluating nil.page_count

As the message says: @page_links is nil => you didn't initialize it.