From b3ee17209063f407fd9664477d27ce6f0596ed49 Mon Sep 17 00:00:00 2001 From: Maxime Lapointe Date: Thu, 31 May 2018 16:49:12 -0400 Subject: [PATCH] Fix association in README Just fixing `Comment.has_many :posts` to `Comment.belongs_to :post` in a README example. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f448988..4ebdeab 100644 --- a/README.md +++ b/README.md @@ -119,10 +119,10 @@ discarded. Just override the `kept` scope on the Comment model. ``` ruby class Comment < ActiveRecord::Base - has_many :posts + belongs_to :post include Discard::Model - scope :kept, -> { undiscarded.joins(:posts).merge(Post.kept) } + scope :kept, -> { undiscarded.joins(:post).merge(Post.kept) } end Comment.kept