Daniel (dB.) Doubrovkine
Daniel (dB.) Doubrovkine
@reedlaw Could you write a spec showing what you mean by "having a terrible time getting it to work with ..."?
@reedlaw LMK if you're interested in finishing this, I can help out. The implementation as it stands I don't think is what we want, see comments above.
One thought would be to allow `Post.create!(title: 'LOL', updated_by: nil)`, so when it's set explicitly it can be saved. But then people who do `Post.create!(title: 'LOL', updated_by: current_user)` will miss...
It looks like we removed any automatic `current_user` code in https://github.com/aq1018/mongoid-history/pull/83 because the observer functionality, which supported this feature, was removed in Rails 4. It seems like there's still some...
Looking at the code, the `modifier` relationship name is hard-coded and doesn't change when you use a different field. See https://github.com/aq1018/mongoid-history/blob/c2e91e1f2e4e078295e55e04a893298284c71cab/lib/mongoid/history/tracker.rb#L17. At a first glance this looks weird to me...
It doesn't work how?
In general in Ruby you want to keep the original gems and monkey-patch them in your code (you can declare the class again and add a `def updater` anywhere in...
Great progress. If you solve 2/3 of the cases that's already good enough to merge, so feel free to do that if the last one turns out to be too...
Also, there's nothing wrong with taking a dependency on something like https://github.com/bopm/mongoid_relations_dirty_tracking, in fact I would prefer that since it (theoretically) specializes in one thing better.
Still looking forward for a mergeable PR here!