diff options
author | Bogdan Gusiev <agresso@gmail.com> | 2012-09-07 14:42:31 +0300 |
---|---|---|
committer | Bogdan Gusiev <agresso@gmail.com> | 2012-09-07 14:42:31 +0300 |
commit | 6777f7b75d1d10ff148e3d72cef3ef642de5bda3 (patch) | |
tree | e9c074fc4a993978e8ba31ce4b47843f41b0549c /activesupport/lib | |
parent | e20a790b9e63ff7ff71753b24bd88c0a62dc2cf7 (diff) | |
download | rails-6777f7b75d1d10ff148e3d72cef3ef642de5bda3.tar.gz rails-6777f7b75d1d10ff148e3d72cef3ef642de5bda3.tar.bz2 rails-6777f7b75d1d10ff148e3d72cef3ef642de5bda3.zip |
AS::Callbacks: deprecate monkey patch of object callbacks
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 1 |
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 |