You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like we removed any automatic current_user code in #83 because the observer functionality, which supported this feature, was removed in Rails 4. It seems like there's still some code lingering here, notably setting current_user_method - @kotaiahpendurthi would you mind making a PR that removes that?
This means you will have to assign the modifier explicitly in your code.
I was just bit by this, trying to set current_user_method and coming up with a blank modifier. It's pretty easy to come across in code, which eventually led me here trying to figure out why the method doesn't do anything. Everything else is working smoothly. 👍
Hi i am using mongoid-history gem along with the device gem for authentication.
Following is the code snippet in my mongoid-history.rb(initializer)
Mongoid::History.tracker_class_name = :history_tracker
Mongoid::History.current_user_method = :current_user
Following is the code snippet in one of my model
include Mongoid::History::Trackable
telling Mongoid::History how you want to track changes
track_history :track_create => true, # track document creation, default is false
:track_update => true, # track document updates, default is true
:track_destroy => true, # track document destruction, default is false
:changes_method => :changes_with_schedule,
:modifier_field => :modifier
But modifier_id is not updating on updating the record.
Please let me know if i am missing something or modifier field doesn't support the deveice gem
The text was updated successfully, but these errors were encountered: