diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-12-16 17:05:16 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-12-16 17:05:16 -0200 |
commit | 4b669dbb9180c7f9740bc24dea403b82c8d6ddc9 (patch) | |
tree | 3ccc754c7bf487be10b7e07f8226b6df502e890e /activesupport/lib/active_support/callbacks.rb | |
parent | 97e413002639c1e19503f9c9875fc83428c36f51 (diff) | |
parent | b1c19eb05299fbae2a80beb4abacacc4b5340776 (diff) | |
download | rails-4b669dbb9180c7f9740bc24dea403b82c8d6ddc9.tar.gz rails-4b669dbb9180c7f9740bc24dea403b82c8d6ddc9.tar.bz2 rails-4b669dbb9180c7f9740bc24dea403b82c8d6ddc9.zip |
Merge branch 'master' into merge-action-cable
Diffstat (limited to 'activesupport/lib/active_support/callbacks.rb')
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index d43fde03a9..bf560ec1fa 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -295,6 +295,13 @@ module ActiveSupport class Callback #:nodoc:# def self.build(chain, filter, kind, options) + if filter.is_a?(String) + ActiveSupport::Deprecation.warn(<<-MSG.squish) + Passing string to define callback is deprecated and will be removed + in Rails 5.1 without replacement. + MSG + end + new chain.name, filter, kind, options, chain.config end @@ -575,7 +582,7 @@ module ActiveSupport # set_callback :save, :before_meth # # The callback can be specified as a symbol naming an instance method; as a - # proc, lambda, or block; as a string to be instance evaluated; or as an + # proc, lambda, or block; as a string to be instance evaluated(deprecated); or as an # object that responds to a certain method determined by the <tt>:scope</tt> # argument to +define_callbacks+. # |