method

clear

rails latest stable - Class: ActiveModel::DeprecationHandlingMessageArray

Method deprecated or moved

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

clear()
public

No documentation available.

# File activemodel/lib/active_model/errors.rb, line 653
    def clear
      ActiveSupport::Deprecation.warn("Calling `clear` to an ActiveModel::Errors message array in order to delete all errors is deprecated. Please call `ActiveModel::Errors#delete` instead.")

      @errors.delete(@attribute)
    end