Closed haastrupea closed 2 years ago
Looking good @haastrupea. Thanks for taking the time to submit this PR. Do you think we can rename
totalRecord
tocount
and I like that it is defaulting to 1. I'm looking at simplifying the code and just default to using .createEach even if the caller want's a single record. What do you think?
Thank you. I thought about it too, it is actually a great way to simplify the code
Looking good @haastrupea. Thanks for taking the time to submit this PR. Do you think we can rename
totalRecord
tocount
and I like that it is defaulting to 1. I'm looking at simplifying the code and just default to using .createEach even if the caller want's a single record. What do you think?
Done
@haastrupea this is getting exciting. I was wondering if we can smartly return an object if the record created was 1 and we can take that cognitive load off the user. What do you think?
Also, can you attach a screenshot of this working on your machine?
@haastrupea this is getting exciting. I was wondering if we can smartly return an object if the record created was 1 and we can take that cognitive load off the user. What do you think?
Also, can you attach a screenshot of this working on your machine?
Well, I thought about it too but you know the rule, always keep it simple. Now that you asked, it is done.
Just so you know for readability I decided to go with the if
block for the logic instead of a ternary
operator. if that is okay.
Thanks @haastrupea
Fixes #1 💯 Create multiple records with the vane helper