Skip to content

Commit

Permalink
update Demo in README
Browse files Browse the repository at this point in the history
  • Loading branch information
flyerhzm committed Nov 5, 2023
1 parent 0a39447 commit ac58d67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,17 +287,17 @@ $ rails new test_bullet
$ cd test_bullet
$ rails g scaffold post name:string
$ rails g scaffold comment name:string post_id:integer
$ bundle exec rake db:migrate
$ bundle exec rails db:migrate
```

2\. Change `app/models/post.rb` and `app/models/comment.rb`

```ruby
class Post < ActiveRecord::Base
class Post < ApplicationRecord
has_many :comments
end

class Comment < ActiveRecord::Base
class Comment < ApplicationRecord
belongs_to :post
end
```
Expand Down

0 comments on commit ac58d67

Please sign in to comment.