Alex Villa


10 Experience
0 Lessons Completed
0 Questions Solved


Posted in Introduction to Importing from CSV Discussion

(Using the end of the video to reference line numbers)

Why did you choose to use `user = User.create(...params...)` on L14, followed by `counter+=1 if user.persisted?` on L16 rather than `user =` and `counter+=1 if`. I don't necessarily feel one is better than the other but I've always tended towards the latter. Is there an advantage one way or the other?