Dhinesh
Dhinesh

Reputation: 1

Rails paginator error?

I'm currently using rails 2.3.8.. I have got this error message when paginating my views?

undefined method `foos_url' for #ActionView::Base:0xf4e92cc
Extracted source (around line #52):
50: <%= @page.number %>
51: <%= link_to("Prev", foos_url(:page => @page.prev.number)) if @page.prev? %>
52: <%= link_to("Next", foos_url(:page => @page.next.number)) if @page.next? %>

I have done with the instruction given in http://paginator.rubyforge.org/
How can i get out of this?

Upvotes: 0

Views: 79

Answers (2)

oldhomemovie
oldhomemovie

Reputation: 15129

In terminal, within the project's folder type in rake routes | grep foos and see if there's any match. Is there's no -- check the Chris Barretto's answer.

Also note that paginator gem seem to be out of date. Consider using will_paginate or kaminary gem (although, later seems to only support Rails 3.x).

Upvotes: 1

Chris Barretto
Chris Barretto

Reputation: 9529

Do you have

routes.rb

map.resources :foos 

foos_controller.rb

def index
end

Upvotes: 0

Related Questions