input = [9,9,9,9,9,9,9,9,9,9,9,9]
input.uniq == 9

...

Ruby Test if array contains the ...

by astropanic.myopenid.com, May 23, 2011 07:50, 11 refactorings, tagged with speed, array, uniqueness

How I can check all element...

55502f40dc8b7c769880b10874abc9d0 Talk
def before_create_save(record)
  vouchercode = generate_vouchercode(8)
  while Voucher.find(:first, :conditions => {:vouchercode => vouchercode})
...

Ruby While loop to get unique value

by dive.myopenid.com, January 06, 2009 16:44, 5 refactorings, tagged with while, uniqueness

Coming from python, I would...

6cb63e2304cb64236520d0e3e353c9bc Talk