mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Reword Post model to note there are lines not shown
This commit is contained in:
parent
45f0fead7a
commit
f9793a121e
1 changed files with 2 additions and 1 deletions
|
@ -1654,9 +1654,10 @@ model, `app/models/post.rb`, as follows:
|
|||
|
||||
```ruby
|
||||
class Post < ActiveRecord::Base
|
||||
has_many :comments, dependent: :destroy
|
||||
validates :title, presence: true,
|
||||
length: { minimum: 5 }
|
||||
has_many :comments, dependent: :destroy
|
||||
[...]
|
||||
end
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue