Hi all. I have a big problem with date_select helper, because i guess it can''t resolve local variables to set correctly selected date. Small example: <% @client.charge_regs.each do |creg| %> <%= form_remote_tag with_progress(:url => { :action => ''foo'' }) %> <%= date_select ''creg'', ''valid_before'' %> <% end_form_tag %> <% end %> selected date will be assigned to current date instead of ''valid_before'' value of ''creg'' variable in loop. Is it possible to fix it? Thx in advance.
zven wrote:> <% @client.charge_regs.each do |creg| %> > <%= form_remote_tag with_progress(:url => { :action => ''foo'' }) %> > <%= date_select ''creg'', ''valid_before'' %> > <% end_form_tag %> > <% end %> > > selected date will be assigned to current date instead of ''valid_before'' > value of ''creg'' variable in loop.Form helpers work on instance variables, so you want: <% @client.charge_regs.each do |@creg| %> -- We develop, watch us RoR, in numbers too big to ignore.