aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@plataformatec.com.br>2012-09-07 05:13:42 -0700
committerJosé Valim <jose.valim@plataformatec.com.br>2012-09-07 05:13:42 -0700
commitc5ac6da5c213d61acc8a3552cf58a224be92ba53 (patch)
treee9c074fc4a993978e8ba31ce4b47843f41b0549c /activesupport/lib
parente20a790b9e63ff7ff71753b24bd88c0a62dc2cf7 (diff)
parent6777f7b75d1d10ff148e3d72cef3ef642de5bda3 (diff)
downloadrails-c5ac6da5c213d61acc8a3552cf58a224be92ba53.tar.gz
rails-c5ac6da5c213d61acc8a3552cf58a224be92ba53.tar.bz2
rails-c5ac6da5c213d61acc8a3552cf58a224be92ba53.zip
Merge pull request #7560 from bogdan/deprecate_callbacks_monkeypatch
AS::Callbacks: deprecate monkey patch of object callbacks
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/callbacks.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
index a55f68497c..7166c21268 100644
--- a/activesupport/lib/active_support/callbacks.rb
+++ b/activesupport/lib/active_support/callbacks.rb
@@ -279,6 +279,7 @@ module ActiveSupport
def _normalize_legacy_filter(kind, filter)
if !filter.respond_to?(kind) && filter.respond_to?(:filter)
+ ActiveSupport::Deprecation.warn("Filter object with #filter method is deprecated. Define method corresponding to filter type (#before, #after or #around).")
filter.singleton_class.class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
def #{kind}(context, &block) filter(context, &block) end
RUBY_EVAL