Forum: Ruby on Rails need to change number of thumbnails on my view page PLZ HELP

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
ccd03c (Guest)
on 2007-04-26 06:54
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

<p>
<%= form_tag({:action=>'create'}, :multipart => true)%>
<p><label for="photo_title">Title</label><br/>
<%= text_area 'pagesize', 'size'  %></p>
  <%= submit_tag "Submit" %>
<%= end_form_tag %>

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

</p>
This topic is locked and can not be replied to.