method

define_conditional_callback

rails latest stable - Class: ActiveSupport::Callbacks::Callback

Method deprecated or moved

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

define_conditional_callback()
private

Compile around filters with conditions into proxy methods that contain the conditions.

For `set_callback :save, :around, :filter_name, if: :condition’:

def _conditional_callback_save_17
  if condition
    filter_name do
      yield self
    end
  else
    yield self
  end
end