开发者

Rails paginator error?

开发者 https://www.devze.com 2023-03-20 13:37 出处:网络
I\'m currently using rails 2.3.8.. I have got this error message when pagin开发者_开发技巧ating my views?

I'm currently using rails 2.3.8.. I have got this error message when pagin开发者_开发技巧ating 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?


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).


Do you have

routes.rb

map.resources :foos 

foos_controller.rb

def index
end
0

精彩评论

暂无评论...
验证码 换一张
取 消