Store in session variable
Sent from my iPhone
On Dec 14, 2007, at 8:39 PM, hsun
<hadisunyoto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> 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
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---