I want to write basically
User.find(:all).each {|u| u.update_attribute("email","nil#{incrementing_number}")}
How do I make that #{incrementing_number}
incremement per updated attribute.
:D
I want to write basically
User.find(:all).each {|u| u.update_attribute("email","nil#{incrementing_number}")}
How do I make that #{incrementing_number}
incremement per updated attribute.
:D
User.find(:all).each_with_index {|u,i| u.update_attribute("email","nil#{i}")}