1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

[guide] Enable syntax highlight for a code in AR validation guide

This commit is contained in:
Masataka Pocke Kuwabara 2022-04-18 23:28:03 +09:00
parent c9e5057de4
commit c280c5d4d9

View file

@ -190,7 +190,7 @@ Note that an object instantiated with `new` will not report errors
even if it's technically invalid, because validations are automatically run even if it's technically invalid, because validations are automatically run
only when the object is saved, such as with the `create` or `save` methods. only when the object is saved, such as with the `create` or `save` methods.
``` ```ruby
class Person < ApplicationRecord class Person < ApplicationRecord
validates :name, presence: true validates :name, presence: true
end end