Skip to content
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
wants to merge 121 commits into
base: core
Choose a base branch
from

Conversation

siegfault
Copy link

No description provided.

jhawthorn and others added 30 commits November 1, 2017 16:01
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
Add paranoia_destroy and paranoia_delete aliases
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
Monkeypatch activerecord relations to work with rails >=5.2.0rc2
Improvements to rails 5.2 patches
swelther and others added 30 commits February 28, 2022 13:30
* update Rails

* add specs for broken case

* apply fix

Co-authored-by: Djilani Kebaili <[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.
* 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.