forked from rubysherpas/paranoia
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pulling in gem this is forked from for latest changes #5
Open
siegfault
wants to merge
121
commits into
procore:core
Choose a base branch
from
rubysherpas:core
base: core
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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 should help users be more explicit about what action they want to perform. My hope is that this will also make it easier to migrate off of paranoia.
This makes paranoia's code itself more explicit.
This removes the assumption from `really_destroy!` that there is only one column value, the deletion date, that needs to be updated on a model that is being `really_destroy!`ed. Instead, use the defined `paranoia_destroy_attributes` as they are used in `destroy` and other calls. This prevents an issue where the DBMS will complain when trying to `really_destroy!` one of these models, given that paranoia is attempting to insert a DateTime value into a boolean (or otherly- typed) column. Fixes #326
…ith-sentinel-value Rebase of #412
Version-related cleanup
Add paranoia_destroy and paranoia_delete aliases
Version 2.4.0
Test with Rails 5.2
This isn't a change from how paranoia has been developed for the past few years, but makes it more explicit. I hope the recommendation against new projects using paranoia isn't too controversial. I think anyone who has used this gem extensively has been surprised by it many times. This is just the nature of replacing ActiveRecord's behaviour. I believe paranoia does extremely well given that it does that. A lot of developers will reach for paranoia or acts_as_paranoid because they're the first result they will find. However most users are just looking to hide or disable some records, and they would do much better to just toggle a flag rather than have paranoia override ActiveRecord's behaviour on their model. I hope linking to discard here isn't inappropriate, I believe it's the best resource describe the caveats of paranoia as well as give a good example of how to soft-delete without needing paranoia or acts_as_paranoid.
Add a very soft deprecation notice
Test new ruby versions
Monkeypatch activerecord relations to work with rails >=5.2.0rc2
Improvements to rails 5.2 patches
Co-authored-by: Sebastian Welther <[email protected]>
Co-authored-by: Sherif Elkassaby <[email protected]>
* update Rails * add specs for broken case * apply fix Co-authored-by: Djilani Kebaili <[email protected]>
Co-authored-by: Mathieu Jobin <[email protected]>
Co-authored-by: Boris <[email protected]> Co-authored-by: Mathieu Jobin <[email protected]>
Fix syntax to restore a record that were deleted within 2 minutes of the object
… might match table names which cause an exception when selecting with the dleted/deleted at columns. (#512)
The query to find deleted has_many or has_one through associations was being generated incorrectly because of specifying the wrong foreign key for the table. This change uses the has_one/has_many model's primary key as the foreign key.
* test-out-experimental-with-non-existing-ruby-3.2 * redo build matrix with includes * shorten the matrix with standard builds * only jruby 9.4 for rails 7 * remove experimental stuff * bump version. changelog, comment out jruby * remove dup
deleted\? might be overridden by other gems, better to use the namespaced method
* Remove unused local variable delete dead code that became unused due to changes in commit 9937512 * group the assignment to the local variable in the same way as the assignment to association_foreign_key * move temporary variables, which are only referenced when association_class.paranoid? is true, inside the conditional branch * simplify association_find_conditions further --------- Co-authored-by: Mathieu Jobin <[email protected]>
Update paranoia.gemspec Co-authored-by: Lachlan Sylvester <[email protected]> Rails 7.1 Release 🚀 - Updated CHANGELOG.md and version.rb
GitHub Actions workflow prints the following warning. > The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/ This PR updates actions/checkout to v4 in order to suppress the warning.
- ahead of Rails 7.2 releases
* test: simplify HasOneWithScope relation config * test: add has_one restore by accident test case * test: imporove has_one_with_scope_missed
* Add support for Rails 7.2 * Remove Rails 7.2 changelog entry v2.6.4 doesn't actually support Rails 7.2, so drop this item from the changelog.
* See what happens on Rails edge * Tweak support for Ruby 2.7 * Add Ruby exclusions * Correct exclusion syntax
* handle #delete_all * add documentation * remove rails-edge for now --------- Co-authored-by: Mathieu Jobin <[email protected]>
* Do not use sqlite3 v2.0.0 or later to fix CI * Implement after_restore_commit feature --------- Co-authored-by: Mathieu Jobin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.