Forum: Ruby on Rails Using Paginator outside of controllers

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Shark Fin S. (Guest)
on 2006-04-23 20:29
(Received via mailing list)
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?
This topic is locked and can not be replied to.