-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default User model is not working unless you add mongoid_userstamp_user call #23
Comments
BTW, the error I get if I don't do what explained is:
|
I edited my initial comments with the updated code with the general solution for using it with HistoryTracker. The mongoid_userstamp gem won't work and will issue the mentioned error unless I explicitly include mongoid_userstamp on the HistoryTracker model. Note that without using HistoryTracker, I still had to include the mongoid_userstamp call to make it work properly. |
Can you reduce this down to a failing RSpec and commit it, so I can attempt to fix it? |
Just sent you the pull request but I would need your advice on how to solve that issue I mention on the pull request. thanks! |
I think this might be related with the other 2 issues you have open in this gem, but I had a long debugging session till I found out that unless you explicitly add the mongoid_userstamp_user call on the model where you want to use the userstamps, the gem won't be applied to the model if you just use:
include Mongoid::Userstamp
as the readme implies in the first example.
I'm using the gem in combination with https://github.com/aq1018/mongoid-history . I'm using the following gemset (short version):
Using Ruby 2.1.4
My models (reduced version) are as follows:
I think the issue is with the default call to mongoid_userstamp, which for some reason doesn't happen as expected.
The text was updated successfully, but these errors were encountered: