[Rails] Re: Generating a unique id ?

nuno nomail at novalidatall991.com
Wed Aug 9 01:44:00 GMT 2006


Francis Cianfrocca wrote:
> nuno wrote:
>> Francis Cianfrocca wrote:
>>> 
>>> In Ruby: `uuidgen` will work under both unix and windows.
>> 
>> Okay !! I thought it was a method name... But what is the meaning of 
>> these strange quotes `` ???
> 
> Read the Ruby language docs: enclosing a string in backticks causes it 
> to be executed in a shell. You can put arbitrarily complex commands in 
> there, same as you would at a shell prompt. You can also put #{...} as 
> in a Ruby double-quoted string. Your program stops running until the 
> command completes, and in Ruby, you get back a String which contains 
> whatever the command wrote to stdout.
> 

Thanks for the hints !


-- 
Posted via http://www.ruby-forum.com/.


More information about the Rails mailing list