Need to change number of thumbnails on my view page PLZ HELP


#1

Hey I am making a photo website for a class and I am stuck i need to
have a text_area pick up a variable and put it in my controller to
change the number of thumbnails that show up on my view page. I can not
figure out how to create this and make a text_area and button to submit
it and have the page refresh with the new number of thumbnails on it.
Here are some snippits of my code.

photos_controller.rb

def list
@photo_pages, @photos = paginate :photos, :per_page =>
((@params[:pagesize]) || 12)
end

def update_list
@pagesize = pagesize.new(params[:pagesize])
@pagesize.save
@pagesize = pagesize.find(params[:pagesize])
#auto_complete_for :pagesize
@photo_pages, @photos = paginate :photos, :per_page =>
pagesize.find(params[:pagesize])
end

list.rhtml

<%= form_tag({:action=>'create'}, :multipart => true)%>

Title
<%= text_area 'pagesize', 'size' %>

<%= submit_tag "Submit" %> <%= end_form_tag %>

<% #render :action => ‘pagesize’ == @params[:pagesize] %>