On Dec 7, 1:25 pm, Fresh Mix <[email protected]> wrote: > How to make it work with paginator (kaminari)? > > MySQL and full text search: Words (id, word) > > @words = Word.find_by_sql(["SELECT id, word, MATCH (word) AGAINST (?) AS > Score FROM words WHERE MATCH (word) AGAINST (?) ORDER BY Score Desc, > word!=?", params[:search],params[:search],params[:search]]) > > I can't add .page(params[:page]).per(5) to the end of "find_by_sql()" so > what can I do? > You need to extract from the paginator what offset and limit to add to your query. Also, you don't need to use find_by_sql here, which would dodge the issue entirely
Fred > -- > Posted viahttp://www.ruby-forum.com/. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

