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.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Nathan Esquenazi
2008-Apr-15 02:03 UTC
Re: Asking for help passing variables with an observe_field
<%= 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.
--
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
-~----------~----~----~----~------~----~------~--~---
eggman2001
2008-Apr-15 17:05 UTC
Re: Asking for help passing variables with an observe_field
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 Esquenazi <rails-mailing-l...@andreas- s.net> wrote:> <%= 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. > > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---