Rick Lloyd wrote:
> You want to use Time.now.to_f if you're worried about more than one
> hit per second.
> 
> 
> On Aug 19, 11:44�am, Maur�cio Linhares <[email protected]>

Thank you for the fast response
Time.now.to_f gives me the following
<div id="edit-form-1250697708.562" style="display: none;">
</div>
<div id="list-form-1250697708.562">
</div>
<div id="edit-form-1250697708.562" style="display: none;">
</div>
<div id="list-form-1250697708.562">
</div>
<div id="edit-form-1250697708.562" style="display: none;">
</div>
<div id="list-form-1250697708.562">
</div>
<div id="edit-form-1250697708.562" style="display: none;">
</div>

My partial looks like this

<%tnow = Time.now.to_f%>
<%-list_form_id = "list-form-#{tnow}"-%>
<%-edit_form_id = "edit-form-#{tnow}"-%>
<div id =<%=list_form_id-%>>
  <%= render :partial => 'address_list', :object => f.object, :locals => 
{:edit_form_div => edit_form_id} -%>
</div>
<div id =<%=edit_form_id-%> style="display: none">
  <fieldset>
etc...

I'll move the div id generation out into a helper when I have this 
working but I'm totally stumped
-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to