Model Product ... #has weight end
ProductController def list top = params[:top] #positive integer #select how many product based on weight from highest to lowest as much as 'top' element #for example: list?top=10, only list the top 10 heaviest product ... end
def edit ... #edit product ... #redirect to list end
so in browser http://localhost/product/list?top=10 i will get the top 10 heaviest product i edit on of the product then it will bounce back to list?top=10 instead of list
the question is: how can i maintain the params[:top] across several methods in 1 controller or several controllers?
Thank you