method

halting

rails latest stable - Class: ActiveSupport::Callbacks::Filters::Around

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.0.0.1) is shown here.

halting(callback_sequence, user_callback)
private

No documentation available.

# File activesupport/lib/active_support/callbacks.rb, line 277
        def self.halting(callback_sequence, user_callback)
          callback_sequence.around do |env, &run|
            target = env.target
            value  = env.value

            if env.halted
              run.call
            else
              user_callback.call(target, value) {
                run.call.value
              }
              env
            end
          end
        end