Flowdock
method

add_on_empty

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActiveModel::Errors

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.

add_on_empty(attributes, options = {}) public

Will add an error message to each of the attributes in attributes that is empty.

person.errors.add_on_empty(:name)
person.errors.messages
# => {:name=>["can't be empty"]}
Show source
Register or log in to add new notes.