开发者

Rails (pagination and tags)

I stumbled upon a problem of how to make work together acts_as_taggable (on steroids) and will_paginate gems. What I found on this problem is this: http://www.mckinneystation.com/2007/08/20/pagination-with-acts_as_taggable_on_steroids-acts_as_ferret-and-will_paginate/

Bu开发者_StackOverflowt it's dated of 2007, may be there's something more recent? And also could you explain in details what should I do to make that fix work?


There is another blog post http://blog.wolfman.com/articles/2007/07/30/paginating-acts_as_taggable-with-will_paginate

There is an update near the bottom of the post that suggests using

Model.find_options_for_tagged_with(@tag)

To get the options to pass to the paginate method. You just need to merge in the :page and :per_page options as needed.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜