# Plugin for MongoMapper that adds find_and_modify support
module FindAndModifyPlugin
extend ActiveSupport::Concern
module ClassMethods
def find_and_modify(options)
load collection.find_and_modify(options)
end
end
end
http://jottingsoncomputation.blogspot.com/2012/08/adding-findandmodify-to-mongomapper-and.htmlKevin
On Tuesday, August 28, 2012 6:25:16 AM UTC-4, Kevin Bullaughey wrote:
Did I miss find_and_modify? or is it not part of MongoMapper?
If it's not part of MongoMapper, is there some reason?
I feel it's one of the most useful aspects of MongoDB. Of course, I can use it directly on the collection object via the ruby driver, but it seems like there would be some advantages to working it into MongoMapper (and maybe plucky?). If it's just awaiting someone to work on it, I could give it a stab.
Thanks,
Kevin