Simple question

How do I pass parameters from one controller to another during
redirect_to command? I want to pass both model and non-model objects.
The solution I use is via session, but I rather pass it as parameters to
the redirect_to

Thanks.

On Jan 17, 2006, at 7:43, thila thila wrote:

How do I pass parameters from one controller to another during
redirect_to command? I want to pass both model and non-model objects.
The solution I use is via session, but I rather pass it as
parameters to
the redirect_to

redirect_to :controller => ‘other’, :action => ‘stuff’, :model_id =>
43, :foo => ‘bar’

will make params[:model_id] and params[:foo] available in the other
controller/action.


Jakob S. - http://mentalized.net

More precisely, ruby variables are references to objects, not the object
itself. You can return a reference to any type of object, including an
Array.

RF

Jakob S. wrote:

On Jan 17, 2006, at 7:43, thila thila wrote:

How do I pass parameters from one controller to another during
redirect_to command? I want to pass both model and non-model objects.
The solution I use is via session, but I rather pass it as
parameters to
the redirect_to

redirect_to :controller => ‘other’, :action => ‘stuff’, :model_id =>
43, :foo => ‘bar’

will make params[:model_id] and params[:foo] available in the other
controller/action.


Jakob S. - http://mentalized.net

Thanks Jakob for the prompt help.