Skip to content

Commit cec6478

Browse files
committed
Fix example code in doc/general/getting_started.md
The `belongs_to` method should take relation name, not a foreign_key property.
1 parent 80e470d commit cec6478

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/general/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ and
3737
class CommentSerializer < ActiveModel::Serializer
3838
attributes :name, :body
3939

40-
belongs_to :post_id
40+
belongs_to :post
4141
end
4242
```
4343

0 commit comments

Comments
 (0)