Hi,
Here I have code to display a list of products to display. I use
pagination to display them . 3 records are diaplyed on a single page.
when I move to the next page I actually passes through the controller.
there I want to access previous pages value.
how to do it.
the controller is
def viewsearchitems
@srchparams = params[:txt_srch].to_s
@cnt = 1
page = (params[:page] ||= 1).to_i
tems_per_page = 3
offset = (page - 1) * items_per_page
@prods=RealEstate.find_by_sql(“select * from real_estates order
by id”)
@prod_pages = Paginator.new(self, @prods.length, items_per_page,
page)
@items = @prods[offset…(offset + items_per_page - 1)]
end
viewsearchitem.rhtml is
<% if @items != nil %>
<% for result in @items %>
<%= link_to result.id , :action => ‘dispitem’, :id => result %>
if I have checkbox associate with each item in every page How do I get
the status of the checkbox in each page when I move from one page to
another