-
Notifications
You must be signed in to change notification settings - Fork 646
Implement whiny persistence so that transition! will raise by default, mirroring ActiveRecord's behavior.
#366
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
Conversation
|
Thanks for taking a stab at this and LGTM. :) Not sure about the version bump though, should be done for semantic versioning reasons but in the end maintainer's call :) |
|
Definitely. I can also take out the version bump or change it to whatever @alto wants. |
| raise ActiveRecord::RecordInvalid.new(self) if aasm_whiny_persistence(name) | ||
| end | ||
|
|
||
| success |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the only possible value for success at this point is true, I'd be explicit and would return true here instead of success .
Might be a personal thing, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can return false if aasm_whiny_persistence is false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. Nevermind then :)
|
@Wildebeest Thanks a lot for your pull request, great work! I even support the default setting for |
|
@Wildebeest And by the way, sorry for coming back to this so late! |
|
@alto No worries! I'm glad you were able to take a look. :) Works for me. I've rebased and updated the PR with your suggestions. |
|
@Wildebeest I just released version |
|
@Wildebeest Have a look at #378, which will be part of the upcoming release |
|
<3 Thanks @alto! |
@PragTob's suggestion from #262.