method
_normalize_legacy_filter
v3.1.0 -
Show latest stable
-
0 notes -
Class: ActiveSupport::Callbacks::Callback
- 1.0.0
- 1.1.0
- 1.1.1
- 1.1.6
- 1.2.0
- 1.2.6
- 2.0.0
- 2.0.1
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.2
- 2.3.8
- 3.0.0 (0)
- 3.0.5 (0)
- 3.0.7 (0)
- 3.0.9 (0)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.3 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- What's this?
_normalize_legacy_filter(kind, filter)
private
Hide source
# File activesupport/lib/active_support/callbacks.rb, line 310 def _normalize_legacy_filter(kind, filter) if !filter.respond_to?(kind) && filter.respond_to?(:filter) filter.singleton_class.class_eval def #{kind}(context, &block) filter(context, &block) end, __FILE__, __LINE__ + 1 elsif filter.respond_to?(:before) && filter.respond_to?(:after) && kind == :around def filter.around(context) should_continue = before(context) yield if should_continue after(context) end end end


