Ruby on Rails Thursday, December 7, 2017

I have recently upgraded from Rails 4.2 to 5.0.6 . I know about the change in callback halting using throw(:abort) instead of returning false. My problem is that I can't make the deprecation warnings go away.


DEPRECATION WARNING: Returning false in Active Record and Active Model callbacks will not implicitly halt a callback chain in Rails 5.1. To explicitly halt the callback chain, please use throw :abort instead.


I have made config/initializers/callback_terminator.rb file with following code


ActiveSupport.halt_callback_chains_on_return_false = false


but I am not still not able to get rid of the warning. Nor am I getting the expected behavior. If I return false from call back it stops the action.
It seems that this configuration is not being applied. I am experiencing this in both dev and test environments.


Is there something I am missing?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6c830eb3-88b7-46d9-ba1d-abada30c1805%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment