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

**URL:** <https://www.ruby-forum.com/t/need-to-change-number-of-thumbnails-on-my-view-page-plz-help/92970>\
**Category:** Rails\
**Created:** [April 26, 2007, 4:54am UTC](https://www.ruby-forum.com/t/need-to-change-number-of-thumbnails-on-my-view-page-plz-help/92970 "2007-04-26T04:54:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ccd03c](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3da27b/32.png) [@ccd03c](https://www.ruby-forum.com/u/ccd03c)\
**Post date:** [April 26, 2007, 4:54am UTC](https://www.ruby-forum.com/t/need-to-change-number-of-thumbnails-on-my-view-page-plz-help/92970/1 "2007-04-26T04:54:03Z")

</div>

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] %\>
