Asking for help passing variables with an observe_field

Hi, I have the following observe field:
<%= observe_field :session_treatment, :url => { :action =>
‘retrieve_rate’ }, :with => ‘treatment’ %>

This passes on the ‘treatment’ variable to the action, but I’d like to
pass another variable and I’m having a hard time figuring out how to
write it. Any help would be appreciated.

<%= observe_field :session_treatment, :url => { :action =>
‘retrieve_rate’ }, :with => “‘treatment=’ + value + ‘&somevalue=’ +
value2” %>

eggman2001 wrote:

Hi, I have the following observe field:
<%= observe_field :session_treatment, :url => { :action =>
‘retrieve_rate’ }, :with => ‘treatment’ %>

This passes on the ‘treatment’ variable to the action, but I’d like to
pass another variable and I’m having a hard time figuring out how to
write it. Any help would be appreciated.

Thanks, but now I’m having trouble with the ‘value2’ part. I’d like
this value2 to be a variable I define in my controller - @user.
However, it seems that this variable isn’t available to the
observe_field. Is this correct? And if so, does that mean I have to
use a hidden form field?

On Apr 14, 10:03 pm, Nathan E. <rails-mailing-l…@andreas-

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs