Skip to content

Commit

Permalink
Fix association in README
Browse files Browse the repository at this point in the history
Just fixing `Comment.has_many :posts` to `Comment.belongs_to :post` in a README example.
  • Loading branch information
MaxLap authored May 31, 2018
1 parent 3707b54 commit b3ee172
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b3ee172

Please sign in to comment.