I have a migration with 14 string columns, which I have named after:
q1, q2, q3...q14
Is there any way that I can iterate through those as literals? something like:
i=1
while i<15 do
Something.each do |t|
t.q+#{i}=...
end
end
..yeah, I hope you do not stick to the code, just to get the idea…
Isn’t there a DRY method for this?
Thanks a bunch..
Regards…
1 Answer