Hi
I have presently the following view :
<div>
<p><%= f.label :tz_area, I18n.t("label.form.tz_area")
%></p/>
<div id="tz_area_selector">
<p>
<%= f.label :timezone,
I18n.t("label.form.timezone") %><br />
<%f.time_zone_select :time_zone, /"#{@instructor.tz_area}"/,
:default =>
@instructor.time_zone %>
</p>
</div>
</div>
As I need to modify the time_zone_select when another field is
modified, I''ll use an Ajax request , so I am using a partial and
replaced this code with
<div>
<p><%= f.label :tz_area, I18n.t("label.form.tz_area")
%></p/>
<div id="tz_area_selector">
<%= render :partial => "tz_selector", :locals
=> { :f =>
f } %>
</div>
</div>
the Ajax request is performed, and my controller try to replace the
partial
....
render :update do |page|
page.replace_html ''time_zone_selector'', :partial =>
"time_zone_selector", :locals => { :f => f }
end
but obviously I get an error ,as f is undefined :
NameError (undefined local variable or method `f''
how can I replace this piece of the form ?
thanks
erwin
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.