Skip to content

Commit

Permalink
Clarify Discard::Model inclusion in README
Browse files Browse the repository at this point in the history
It seems like this will be a common enough mistake. Hopefully this
little hint will help some users.
  • Loading branch information
jhawthorn committed Apr 10, 2018
1 parent afa6d82 commit 3a169f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ Callbacks can be run before, after, or around the discard and undiscard operatio
A likely use is discarding or deleting associated records (but see "Working with associations" for an alternative).

``` ruby
class Comment < ActiveRecord::Base
include Discard::Model
end

class Post < ActiveRecord::Base
include Discard::Model

Expand Down

0 comments on commit 3a169f0

Please sign in to comment.