Pagination per_page using select_box

I want to pass the number of pages in a select box (10,15,25,50) and
when I press some button or just doing the action (observer_field?) it
will change the pagination, how can i do it ?

Make the select box submit params[:per_page] (name="per_page")
onChange. You'll also want it to go back to the first page
(params[:page] = 1) or else you could request an invalid page (e.g.,
there is no page 7 at 50 items per page when you only have 100 items,
even if you were on page 7 when viewing 10 items per page). Pass
per_page and page to the paginate call.