How to validate text isn’t blank in Rails
Rails adds the handy method blank? which checks for false, nil and empty strings as described here. Rails also adds the handy validator allow_blank: false. So in your case it should be: validates :body, presence: true, allow_blank: false Edit (original answer above): As stated in the answer below, allow_blank: false is not needed as that’s … Read more