Sewdn/meteor-collection-behaviours — pull request #8 by svub (2014-07-31 11:27:09+00:00)
Title: Making unRemove of softRemovable work

Guess the "//TODO" note in unRemove was due to the fact that the method was actually not working.
I made two changes.
First, the update call to remove the "removed" flag needs to have "removed: true" in the selector so that the findOne method does not filter out the document to be undeleted.
But Meteor does not permit to add this to an update on the client side. (Error "Error: Not permitted. Untrusted code may only update documents by ID. [403]")
First I was trying to add a custom flag to the options object to signal that an undelete is taking place, but the options do not get forwarded to the findOne method, unfortunately.
Thus the Meteor.method that sends the undelete request to the server and calls the update there with the "removed: true" flag. Honestly, I think it's not a beautiful solution, but after trying everything else I could think of, it seems to be the only one actually working.