Will_paginate problem

Hi,
I have a problem using paginate: i made the paginate to work, but it
only shows results in the first page, whenever i click on the second or
others it doesnt show results, and i have more then 2 results for that
search.

this is the code

controller:

def searchnome
nome = params[:nome]
@posts = Post.paginate(:all,:conditions => [“name=?”,
“#{nome}”],:page => params[:page] ,:per_page => 2 )
end

view :

<% @posts.each do |post| %>

Name : <%=h post.name %>
Title : <%=h post.title %>
Content
<%=h post.content %>

<% end %>
<%= will_paginate @posts %>

i am a bit new in ruby, any help is welcome :slight_smile: