-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify `discard` and `undiscard` methods - remove with_transaction_returning_status, run_callbacks shoudl return the result of the block - use update_attribute as no validation should be performed to discard (same as with destroy) Scope `discard_all` to only kept records, `#discard` will not change them and this can save some ierations and help to return only affected records at the end of the query (more like `destroy_all`) Scope `discard_all` to only discarded records, `#undiscard` will not change them and this can save some iterations and help to return only affected records at the end of the query (more like `destroy_all`) Update README to clarify that save and update callbacks are run when discarding/undiscarding Update travis ruby versions Add .yardopts
- Loading branch information
Gustavo Bazan
committed
Apr 18, 2018
1 parent
abf3715
commit dfdd984
Showing
6 changed files
with
70 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--protected | ||
--no-private | ||
--embed-mixin ClassMethods | ||
- | ||
README.md | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
LICENSE.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
module Discard | ||
VERSION = "1.0.0" | ||
# Discard version | ||
VERSION = "1.0.0".freeze | ||
end |