From 8ad0446547705a632dafb505ded877a61b1d9183 Mon Sep 17 00:00:00 2001 From: Isaiasdelahoz Date: Wed, 4 Sep 2019 17:10:39 -0500 Subject: [PATCH] Add discard! and undiscard! methods to README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8fff7d1..31f8ee0 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ Post.discarded # => [] post = Post.first # => # post.discard # => true +post.discard! # => Discard::RecordNotDiscarded: Failed to discard the record post.discarded? # => true post.discarded_at # => 2017-04-18 18:49:49 -0700 @@ -82,6 +83,7 @@ end ```ruby post = Post.first # => # post.undiscard # => true +post.undiscard! # => Discard::RecordNotUndiscarded: Failed to undiscard the record ``` ***From a controller***