Skip to content
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

Rails 4 compatibility #19

Open
jeremylynch opened this issue Sep 8, 2014 · 4 comments
Open

Rails 4 compatibility #19

jeremylynch opened this issue Sep 8, 2014 · 4 comments

Comments

@jeremylynch
Copy link
Contributor

I have run all the tests for this gem for Rails 4/Mongoid 4 and they all seem to be passing, does this gem support Rials 4/Mongoid 4? If not what needs to be updated?

@johnnyshields
Copy link
Collaborator

@mrjlynch can you help us out by raising a PR to add Mongoid 4 / Rails 4 to travis.yml (while still maintaining Rails/Mongoid 3.) You can look around on Github for how other gems do this--generally it involves adding a separate Gemfile.Rails4 and referencing this from travis.yml

@jeremylynch
Copy link
Contributor Author

While the specs are passing for Rails 4, mongoid_userstamp does not seem to be working. The Mongoid::Userstamp::Model class does not seem to be included.

I am getting an undefined method updated_by'` error.

Any ideas what might be causing this?

@johnnyshields
Copy link
Collaborator

This isn't enough info to determine the issue. Did you add include Mongoid::Userstamp into your model class and follow the examples in the readme?

If you can commit a failing spec I will investigate.

@Aethelflaed
Copy link

Adding mongoid_userstamp user_model: 'User' made it work for me.

Actually the initializer seems to silence the error, but if you try to manually call mongoid_userstamp without any argument it will fail with:

NoMethodError: undefined method `sub' for User:Class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants