Skip to content

Conversation

@sudoremo
Copy link
Contributor

The current implementation lead to DEPRECATION WARNINGs under Rails 5 and ultimately prevented records from being saved. If I interpret the code right, the return false statements are not meant for halting the whole saving chain but just mean to exit the method. I've replaced them with a simple return and everything appears to work.

Thanks a bunch for considering this.

@rails-bot
Copy link

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @rafaelfranca (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Copy link
Member

@rafaelfranca rafaelfranca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they were returning false it was halting the callback chain so we need to keep the same behavior.

@sudoremo
Copy link
Contributor Author

Ok, I've now changed it so that the behavior is now the same as before and still compatible with Rails 5.

@rafaelfranca rafaelfranca merged commit 4493a42 into rails:master Nov 29, 2016
@rafaelfranca
Copy link
Member

Awesome! Thank you

@sudoremo
Copy link
Contributor Author

sudoremo commented May 3, 2017

Is there any news on this? Would be great if it could be merged. Thanks :)

@sudoremo
Copy link
Contributor Author

Might I bump again here? Would be useful to have this released. Thanks a lot for considering it.

@robin850
Copy link
Member

robin850 commented Aug 1, 2017

@remofritzsche : 4493a42 is part of the version 1.1.0 of this gem (which has been release on May, 11) so you should be able to use this patch in your application.

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

Successfully merging this pull request may close these issues.

4 participants