-
Notifications
You must be signed in to change notification settings - Fork 50
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
DateTime nil not supported by neo4j #13
Comments
Hey @jelmerderonde. It would be good to know some more details about the error. Perhaps you could paste a gist showing it? Or a bare minimum example project that makes the error happen because the tests for Devise with neo4j all seem to be passing fine. If you just wanted a quick-ish fix, you could try extending Recoverable and overwriting the after_password_reset method (which is empty in Devise's Recoverable module), to set whatever you need in order for the error not to occur. |
Hi @benjackson, Thanks for the quick reply. A gist showing the rails server output when the error occurs: https://gist.github.com/jelmerderonde/2930788bfed7b80f4b2b A minimum project would frankly be just rails, neo4j and devise-neo4j, with a single User resource with the Recoverable module. When a user tries to reset their password, because devise tries to set the reset_sent_at to nil which is not accepted. I did some more research and I think it might be because of this commit in neo4jrb: However I'm not sure of this. I will try to implement the fix you mentioned, but if you have any suggestion on what I can do to implement a more complete fix let me know. |
Sorry for coming into this a little late. I'm still a little unsure about how it's getting to the point that it can try to convert a nil value. Do we know where |
@subvertallchris I think it is here: line 85 |
@jelmerderonde I haven't tried a real example yet, but any idea why this integration test that gets run as part of all the devise tests wouldn't suffer from the same issue you're seeing?: https://github.com/plataformatec/devise/blob/master/test/integration/recoverable_test.rb |
@benjackson is there a way I can run these tests in the context of my app? I will take a look at it. |
@jelmerderonde you could just recreate the integration test that covers the functionality that is breaking for you, but that might still be something attributable to your app rather than the gem. If you're able to create an example in a public repo, with a failing integration test, I'd be happy to take a look and see if I can figure out why the Devise test doesn't capture the same problem. |
I have never before submitted an issue on GitHub or anywhere else, so please let me know if I'm doing something wrong.
I am now working on integrating devise-neo4j with my app. After adding the recoverable property to my User model I ran into an issue. When submitting a new password, it returns the error that the year method is not supported by NilClass. It appears that devise tries to set the reset_password_at property to nil. Upon saving to the neo4j database this gives an error.
It seems to me that this is an issue for devise-neo4j, because it could be normal behaviour for both devise and neo4j, but I'm not sure.
Let me know what I can do to help fix this issue.
The text was updated successfully, but these errors were encountered: