Ruby On Rails 笔记4——常用验证上
1. Validations Overview 我们经常用到 class Person < ApplicationRecordvalidates :name, presence: true endirb> Person.new(name: "John Doe").valid? > true irb> Person.new(name: nil).valid? > false irb> person.errors.objects.fir…
2026-02-03