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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
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.
goodwill wrote:> 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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
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). On Jan 6, 2:28 am, Wildtangent <wildtang...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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. > > goodwill wrote: > > 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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/ it looks like a solution for how to get will_paginate and acts_as_taggable_on_steriods to work together On Jan 5, 10:39 pm, goodwill <william.yeung...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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). > > On Jan 6, 2:28 am, Wildtangent <wildtang...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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. > > > goodwill wrote: > > > 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---