-
Notifications
You must be signed in to change notification settings - Fork 513
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
Mongo Mapper master not compatible #268
Comments
Hi there, I'm responsible for the changes in MM that have surfaced this. I think that strictly speaking, this is a bug in state_machine that was exposed by recent changes to MM's internals. In lib/state_machine/integrations/mongo_mapper.rb:
state_machine is doing its initialization before MongoMapper's I'm going to see if I can get this working in MM in a not-terribly-slow fashion, but if it'd be possible to call |
…acked #initialize before we've gotten to run our own #initialize. Closes #531. Closes pluginaweek/state_machine#268.
FWIW: I can work around this by converting:
to:
Which would suit me fine if it avoids slow downs in MM and/or nasty code and doesn't do BAD things to my business logic (to the tests!) |
I think that would be more correct since the state machine setup relies on That being said, I've fixed the issue in a way that shouldn't be too awful
|
The master branch of mongo mapper isn't happy with the state_machine latest gem. I'm just putting this here to remind me to look at it later. I've raised an issue there as well.
This repo demonstrates the issue: mongomapper/mongomapper#531
The mongo mapper issue is here: mongomapper/mongomapper#531
The text was updated successfully, but these errors were encountered: