Hi Seth

Your paginate arguments should be part of the search call - you don't
need to make two calls:

  Story.search params[:search], :page => params[:page], :order =>
'published_at DESC', :per_page => 9

Of course, for your :order option to work, you'll need published_at to
be an attribute.

Hope this helps

Cheers

--
Pat

On 9/2/2010, "sethg" <[email protected]> wrote:

>I am having a problem with ts and will_paginate.
>
>TS works when I do not put my the story.paginate code in -- when i put
>that code in it kills my search -- it paginates but does not change
>content, can someone assist?
>
>thx,
>
>seth
>
>here is my controller
>
>PAGINATION WORKS BUT SEARCH DOES NOT
>def index
>@stories = Story.search(params[:search])
>@stories = Story.paginate({:page => params[:page],:order =>
>"published_at DESC",:per_page => 9})
>
>SEARCH WORKS BUT PAGINATION DOES NOT
>def index
>@stories = Story.search(params[:search])
>#...@stories = Story.paginate({:page => params[:page],:order =>
>"published_at DESC",:per_page => 9})
>
>PAGINATION WORKS BUT SEARCH DOES NOT
>def index
>#...@stories = Story.search(params[:search])
>@stories = Story.paginate({:page => params[:page],:order =>
>"published_at DESC",:per_page => 9})
>
>Please assist I really want to get my site launched soon.
>
>Seth
>
>--
>You received this message because you are subscribed to the Google Groups 
>"Thinking Sphinx" group.
>To post to this group, send email to [email protected].
>To unsubscribe from this group, send email to 
>[email protected].
>For more options, visit this group at 
>http://groups.google.com/group/thinking-sphinx?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to