I'm trying to create a set of instances that have different instance names using instance_variable_set to change the instance name and I can't seem to get it to work.
for i in 0..3 do
username_str = String.new
username_str = 'user_' + i.to_s
username_new = User.new
username_new.instance_variable_set("@#{WHAT_DO_I_PUT_HERE?}", username_str)
username_new = User.create(:username => username_str)
end
The part I can't figure out is what do I put in the first field of instance_variable_set where I have "WHAT_DO_I_PUT_HERE?"?