Dear group,
What are the most elegant ways in Rails to pass the VARIABLE''s value:
- from action A
- to action B?
Until now, I''ve been doing this like this (but I''m sure there
are other
ways):
1. In action A: redirect_to :action => ''B'', :id =>
VARIABLE
2. In action B: variable = params[:id]
OR:
1. In action A: display a form (form_for :myForm") with a hidden field +
pass the hidden field a value
2. In action B: value = params[:myForm][:myHiddenField]
What are the most elegant for passing values in the most direct way?
Is it possible to easily pass values that are not visible to the user?
Thanks a lot!
Tom
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---