This method is deprecated or moved on the latest stable version.
The last existing version (v5.0.0.1) is shown here.
set(key, value)
public
Set messages for key to value.
person.errors[:name]# => ["cannot be nil"]person.errors.set(:name,["can't be nil"])person.errors[:name]# => ["can't be nil"]
# File activemodel/lib/active_model/errors.rb, line 138
def set(key, value)
ActiveSupport::Deprecation.warn( ActiveModel::Errors#set is deprecated and will be removed in Rails 5.1. Use model.errors.add(:#{key}, #{value.inspect}) instead..squish)
messages[key] = value
end