# Paginate with acts\_as\_taggable\_on\_steroids

**URL:** <https://www.ruby-forum.com/t/paginate-with-acts-as-taggable-on-steroids/125116>\
**Category:** Rails\
**Created:** [January 5, 2008, 6:38pm UTC](https://www.ruby-forum.com/t/paginate-with-acts-as-taggable-on-steroids/125116 "2008-01-05T18:38:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![goodwill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ac8455/32.png) [@goodwill](https://www.ruby-forum.com/u/goodwill)\
**Post date:** [January 5, 2008, 6:38pm UTC](https://www.ruby-forum.com/t/paginate-with-acts-as-taggable-on-steroids/125116/1 "2008-01-05T18:38:01Z")

</div>

How can I do that? I have downloaded will\_paginate but seems it wont  
work together.

I tried this approach:  
options=Post.find\_options\_for\_find\_tagged\_with(“en,  
news”).merge(:page=\>1)  
posts=Post.paginate(options)

but this gives me MySQL Statement Error. Any well packaged solution or  
I have to really hack into details on this one?

William

---

<div class="post-metadata">

**Author:** ![goodwill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ac8455/32.png) [@goodwill](https://www.ruby-forum.com/u/goodwill)\
**Post date:** [January 5, 2008, 7:28pm UTC](https://www.ruby-forum.com/t/paginate-with-acts-as-taggable-on-steroids/125116/2 "2008-01-05T19:28:57Z")

</div>

I’ve just done a test in the console and you just use

paginate\_tagged\_with(‘tag1’,‘tag2’,:page =\> 1)

to return paginated find\_by\_tag. will\_paginate creates new paginating  
finders based on the find methods in the model.

e.g in controller.  
@posts = Post.paginate\_tagged\_with(‘en’,‘news’, :page =\>  
params[:page])

in view:  
\<%= will\_paginate(@posts) %\>

Hope that works for you.

---

<div class="post-metadata">

**Author:** ![goodwill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ac8455/32.png) [@goodwill](https://www.ruby-forum.com/u/goodwill)\
**Post date:** [January 6, 2008, 7:40am UTC](https://www.ruby-forum.com/t/paginate-with-acts-as-taggable-on-steroids/125116/3 "2008-01-06T07:40:41Z")

</div>

It doesnt work, the function said no find\_all\_tagged\_with function  
exist. I am using acts\_as\_taggable\_steroids by the way (not the DHH  
acts\_as\_taggable, though the author said its based on that).

---

<div class="post-metadata">

**Author:** ![goodwill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ac8455/32.png) [@goodwill](https://www.ruby-forum.com/u/goodwill)\
**Post date:** [January 9, 2008, 7:42pm UTC](https://www.ruby-forum.com/t/paginate-with-acts-as-taggable-on-steroids/125116/4 "2008-01-09T19:42:23Z")

</div>

I haven’t tried this yet, but check out:

[http://www.mckinneystation.com/2007/08/20/pagination-with-acts\_as\_taggable\_on\_steroids-acts\_as\_ferret-and-will\_paginate/](http://www.mckinneystation.com/2007/08/20/pagination-with-acts_as_taggable_on_steroids-acts_as_ferret-and-will_paginate/)

it looks like a solution for how to get will\_paginate and  
acts\_as\_taggable\_on\_steriods to work together
