![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Important: This gem is an extraction of Mongoid::Paranoia from the official mongoid gem.
Since Mongoid::Paranoia was removed in the 4.0.0
release of Mongoid, this gem re-enables the functionality of paranoid documents.
Please submit only bug and security fixes. Neither I will accept new features nor changes to existing APIs.
Attention: There are two similarly named gems out there: mongoid-paranoia
and mongoid_paranoia
mongoid-paranoia
's (this one) goal is to stay API compatible, which comes at the cost of (breaking) API changes to be rejected. If you're updating a Mongoid 3.x app to Mongoid 4+ and you depend on Mongoid::Paranoia
this gem is recommended for continuity.
However if your code is working and you want new features, for example a *_restore
callback, you should head over to @simi's mongoid_paranoia
gem at https://github.com/simi/mongoid_paranoia. He is doing a great job there and is willing to accept your PRs ;)
There may be times when you don't want documents to actually get deleted from the database, but "flagged" as deleted. Mongoid provides a Paranoia module to give you just that.
In your Gemfile:
gem 'mongoid-paranoia'
class Person
include Mongoid::Document
include Mongoid::Paranoia
end
person.delete # Sets the deleted_at field to the current time, ignoring callbacks.
person.delete! # Permanently deletes the document, ignoring callbacks.
person.destroy # Sets the deleted_at field to the current time, firing callbacks.
person.destroy! # Permanently deletes the document, firing callbacks.
person.restore # Brings the "deleted" document back to life.
The documents that have been "flagged" as deleted (soft deleted) can be accessed at any time by calling the deleted class method on the class.
Person.deleted # Returns documents that have been "flagged" as deleted.
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)(The MIT license)
Copyright (c) 2009-2013 Durran Jordan, 2013-2015 Mario Uher
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Unknown package
We found that mongoid-paranoia demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.