method

keys

rails latest stable - Class: ActiveModel::Errors

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.

keys()
public

Returns all message keys.

person.errors.messages # => {:name=>["cannot be nil", "must be specified"]}
person.errors.keys     # => [:name]