Joined February 2012
·
Morton 066e

Josey Morton

Software Developer at MortLabs
Software Developer
MortLabs
·
Tulsa, OK
·
·
·

Posted to Update a model with Mongoose over 1 year ago

Interesting, I can't imagine a time when I'd create a new model in order to update an existing record, rather than using something like Cat.findOneAndUpdate({ _id: xxxxx }) but this is a clever loophole if I ever find a need.

Thanks for sharing.

Posted to Angular's Resource module is amazing over 1 year ago

one caveat I've found with ngResource is that you cant pass params to DELETE in the body.

I'm integrating an api where we do filtering on our DELETE for an object but dont want to supply query params.

The api developer eventually broke the pattern and made the Object delete method a POST - blech

Posted to The single most useful thing in bash over 1 year ago

Its a good tip, but yeah - zsh has this and soooo much more.

I would be very interested indeed to see your implementation.

Does it create the object if it doesn't exist in the context?

@dpashkevic - I'm aware. This is most useful in a situation where the order doesn't matter, you just need to grab an object at X, but dont know the key used for X.

Achievements
477 Karma
44,719 Total ProTip Views