Getting params from one view into another

Hi Ruby Forum,

I have a situation that I have never run into before. I need to pass a param from one view into a different section of my controller.

I'm having a bit of trouble passing a variable from my view into another part of my controller in order to control what IP address is used to have the graph applied. I want to pass the IP address to the controller from the view as [:text1] in this example into "one" in my controller.

Normally, when I pass a param, it is used in the same part of the controller..ie, in this case: "view"....not in this case. I need to pass the param from the view page into "one" in order to see the graph I'm generating.

Hi,   Two methods: 1.    in the view action, you can - "$input = params[:text1]" ; then in one action, fetch it out, such as " s = $input; puts "this is s: #{s}" ". $input makes it as a global variable. 2.   you can build a "form" in the view.rhtml, and deliver the params[:text1] by this form to the next action "one"

   Hope it solves your issue.

Br, Myst

On 1月12日, 下午1时44分, jackster the jackle <rails-mailing-l...@andreas-

myst_tt wrote:

Hi,   Two methods: 1.    in the view action, you can - "$input = params[:text1]" ; then in one action, fetch it out, such as " s = $input; puts "this is s: #{s}" ". $input makes it as a global variable. 2.   you can build a "form" in the view.rhtml, and deliver the params[:text1] by this form to the next action "one"

   Hope it solves your issue.

Br, Myst

On 1��12��, ����1ʱ44��, jackster the jackle <rails-mailing-l...@andreas-

On 1��12��, ����1ʱ44��, jackster the jackle <rails-mailing-l...@andreas-

Both great ideas....thanks for helping me out with this

jackster.mobi