Flowdock
method

add_on_blank

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_blank(attributes, options = {}) public

Will add an error message to each of the attributes in attributes that is blank (using Object#blank?).

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