-
Notifications
You must be signed in to change notification settings - Fork 638
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
State methods not reflecting the current state #66
Comments
ghost
assigned alto
May 14, 2013
Is |
It's an ActiveRecord persisted object. |
Indeed, I can confirm the error. Will fix it asap. |
Awesome, thanks! |
Released version 3.0.18 to fix the problem. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello. In AASM 3.0.16, the following code works like this:
my_object.state # => "not_posted"
my_object.state = "completed"
my_object.state # => "completed"
my_object.completed? # => true
In version 3.0.17, it no longer works. In the last line, the "completed?" method now returns "false" - still thinks it's in the "not_posted" state, even though calling the "state" attribute directly shows the correct value. I've also tried persisting the state to the database with the same result, i.e. reloading the object with "my_object.reload" still does not work with the "completed?" method.
If I'm in the Rails console, exiting the console and re-entering it is the only way to obtain the updated state when calling the method.
The text was updated successfully, but these errors were encountered: