[Rails] Re: How to get current time including milliseconds for div id?

2009-08-19 Thread James West
Marnen Laibow-Koser wrote: > On Aug 19, 1:07�pm, James West > wrote: > [...] > > Or you could just increment a counter as you create fields, so that > you have a serial number to put in your id attributes. > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > mar...@marnen.org Problem

[Rails] Re: How to get current time including milliseconds for div id?

2009-08-19 Thread James West
Marnen Laibow-Koser wrote: > On Aug 19, 1:07�pm, James West > wrote: > [...] > > Or you could just increment a counter as you create fields, so that > you have a serial number to put in your id attributes. > Now that has possibilities. I don't know why I didn't think of that. Probably becaus

[Rails] Re: How to get current time including milliseconds for div id?

2009-08-19 Thread Marnen Laibow-Koser
On Aug 19, 1:07 pm, James West wrote: [...] > GUIDS may well be the solution I need :-) > > Any idea howe to create them :-) Um, yeah...use the uuid gem. (Note: I've never done this, but I'd be surprised if it doesn't work.) See http://github.com/assaf/uuid/tree/master . Or you could just inc

[Rails] Re: How to get current time including milliseconds for div id?

2009-08-19 Thread James West
Marnen Laibow-Koser wrote: > James West wrote: >> I need to auto generate a guaranteed to be unique number or string to be >> used something like this in a partial view > > > First of all: what's the purpose of this? Why do you need all these > unique IDs? I want to make sure you've got an app

[Rails] Re: How to get current time including milliseconds for div

2009-08-19 Thread James West
Gleb Mazovetskiy wrote: > This certainly looks like an incorrect approach to the problem. > Could you, please, elaborate on this? That wouldn't surprise me at all. lol! It's quite a complicated scenario and I was trying to keep this simple. Here goes. I'm working on a multi model form solution

[Rails] Re: How to get current time including milliseconds for div

2009-08-19 Thread Gleb Mazovetskiy
This certainly looks like an incorrect approach to the problem. Could you, please, elaborate on this? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" g

[Rails] Re: How to get current time including milliseconds for div id?

2009-08-19 Thread James West
James West wrote: > 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 > > Thank you for the fast response > Time.now.to_f gives me the following > > > > > > > > > > > > > > >

[Rails] Re: How to get current time including milliseconds for div id?

2009-08-19 Thread Marnen Laibow-Koser
James West wrote: > I need to auto generate a guaranteed to be unique number or string to be > used something like this in a partial view > First of all: what's the purpose of this? Why do you need all these unique IDs? I want to make sure you've got an appropriate solution here. As far as yo

[Rails] Re: How to get current time including milliseconds for div id?

2009-08-19 Thread James West
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 Thank you for the fast response Time.now.to_f gives me the following My partial looks like this <%tnow = Time.now.to_f%> <%-lis

[Rails] Re: How to get current time including milliseconds for div id?

2009-08-19 Thread Rick
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 wrote: > Time.now.to_i > > - > Maurício > Linhareshttp://codeshooter.wordpress.com/|http://twitter.com/mauriciojr > > On Wed, Aug 19, 2009 at 12:35 PM, James > > West wrot

[Rails] Re: How to get current time including milliseconds for div id?

2009-08-19 Thread Maurício Linhares
Time.now.to_i - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Wed, Aug 19, 2009 at 12:35 PM, James West wrote: > > I need to auto generate a guaranteed to be unique number or string to be > used something like this in a partial view > > > I thought of u