aq1018/mongoid-history — pull request #48 by luxerama (2012-10-11 11:46:57+00:00)
Title: Specific before and after filters

When I was using mongoid-history with the mongoid hack for activeadmin I ran into a problem whereby the `around_filter` is invoked after the `before_create` filter for the history tracker document was called resulting in `nil` values for the `modifier` field in the history tracker.

I was able to solve this issue by adding explicit before and after filters. This pull request does not necessarily need to be merged into the master should the change cause other issues, however I was wondering if anyone had the same issue and whether or not anyone has any idea of why that is the case.

My suspicion is that it has something to do with the lack of `ActionController` filters in active admin. AA does implement the `around_filter` but doesn't invoke this filter at the same time as it is in `ActionController`, which results in the setting of the controller in the s`Sweper` after the user is asked for by the `before_create` filter resulting in `nil` values for the `modifier` field.

Any questions please let me know.