What’s the API to access Rails’s default can't be blank error message when validation :presence => true fails?
I have the model setup like this:
class TextDocument < Document
validate :content_not_blank # 'content' is an attribute
private
def content_not_blank
if content.blank?
errors.add(:content, ....?) # I want to access 'can't be blank'
end
end
end
I18n.t('errors.messages.blank')should give you what you want.