Monday, May 10, 2010

[Rails] noob question on passing parameters in the url

Hi,

What are the requirements for passing parameters in the url across any
controller/action combinations?

[from controller A...] redirect_to
controller_b_action1_url(:desired_param=>'desired value')

[now from B#1...] redirect_to
controller_b_action2_url(:desired_param=>params[:desired_param])

[from B#2...] redirect_to
controller_a_action2_url(:desired_param=>params[:desired_param])

[now from A#2...] redirect_to
controller_a_action3_url(:desired_param=>params[:desired_param])

Do my routes need to have only certain request actions associated,
e.g., post or put, for this to work? My attempts so far have seemed to
require the use of hidden fields in views to 'save' my desired
parameters for use between calls -- I don't like this approach.

Thanks for any comment,

Lille

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate