Using Paginator outside of controllers


#1

I am doing this in _messages.rthml:
<% shout_pages = Paginator.new self,
Shout.length,
30,
@params[‘page’] %>
<% shouts = Shout.find :all,
:order => “timestamp desc”,
:limit => @story_pages.items_per_page,
:offset => @story_pages.current.offset %>

I am calling the _messages.rhtml with:
<%= render :partial => ‘/shout/messages’ %>

However, I keep getting “uninitialized constant Paginator”

Is this normal? Are you supposed to be able to use Paginator outside
of controllers?