aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-06-27 17:44:23 -0400
committerGitHub <noreply@github.com>2017-06-27 17:44:23 -0400
commit60b253553cf2a25e5c5eec737c738476f6519904 (patch)
tree3a63177592e068824c144f7ef0e92f1fd0c31931
parentab600b1a9268dd5fb00ecccc97f258bcf1c0119d (diff)
parentc79416a347d7abd6ba6b8e824d4a9edf2fd6d18d (diff)
downloadrails-60b253553cf2a25e5c5eec737c738476f6519904.tar.gz
rails-60b253553cf2a25e5c5eec737c738476f6519904.tar.bz2
rails-60b253553cf2a25e5c5eec737c738476f6519904.zip
Merge pull request #29518 from ragesoss/master
Add more explicit guidance on how to fix callback deprecations
-rw-r--r--activesupport/lib/active_support/callbacks.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
index ddfa91a342..aa33bd8889 100644
--- a/activesupport/lib/active_support/callbacks.rb
+++ b/activesupport/lib/active_support/callbacks.rb
@@ -662,8 +662,10 @@ module ActiveSupport
if options[:if].is_a?(String) || options[:unless].is_a?(String)
ActiveSupport::Deprecation.warn(<<-MSG.squish)
- Passing string to :if and :unless conditional options is deprecated
- and will be removed in Rails 5.2 without replacement.
+ Passing string to be evaluated in :if and :unless conditional
+ options is deprecated and will be removed in Rails 5.2 without
+ replacement. Pass a symbol for an instance method, or a lamdba,
+ proc or block, instead.
MSG
end