From 9314867b1fefffa4c5a1a876886fde6655bd2dae Mon Sep 17 00:00:00 2001 From: Jason Noble Date: Sat, 24 Nov 2012 22:37:50 -0700 Subject: Moved position of has_many --- guides/source/getting_started.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'guides') diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index 64435c0d5b..c517d23e40 100644 --- a/guides/source/getting_started.md +++ b/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 ``` -- cgit v1.2.3