Flowdock
method

_normalize_legacy_filter

Importance_0
v3.0.9 - Show latest stable - 0 notes - Class: ActiveSupport::Callbacks::Callback
_normalize_legacy_filter(kind, filter) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/callbacks.rb, line 323
      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
Register or log in to add new notes.