Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moved position of has_many

  • Loading branch information...
commit 9314867b1fefffa4c5a1a876886fde6655bd2dae 1 parent 3e8c4bc
@jasonnoble jasonnoble authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 guides/source/getting_started.md
View
5 guides/source/getting_started.md
@@ -1292,6 +1292,7 @@ makes each comment belong to a Post:
```ruby
class Comment < ActiveRecord::Base
belongs_to :post
+ attr_accessible :body, :commenter
end
```
@@ -1299,10 +1300,10 @@ You'll need to edit the `post.rb` file to add the other side of the association:
```ruby
class Post < ActiveRecord::Base
+ has_many :comments
validates :title, presence: true,
length: { minimum: 5 }
-
- has_many :comments
+ [...]
end
```
Please sign in to comment.
Something went wrong with that request. Please try again.