RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: richardsondx
I just tried both out of curiosity;
When I use "errors[:base] << message" it returns:
When I use "errors.add :base, message" it returns the exact validation errors:
- First name cannot be empty
- Last name cannot be empty
- Number is required
- Verification value is required"
So I ended up using: errors.add :base, message