class ActiveSupport::Callbacks::CallbackChain

def remove_duplicates(callback)

def remove_duplicates(callback)
  @all_callbacks = nil
  @single_callbacks.clear
  @chain.delete_if { |c| callback.duplicates?(c) }
end