permanent_records | Rails Plugin - soft-delete your ActiveRecord records | Web Framework library
kandi X-RAY | permanent_records Summary
kandi X-RAY | permanent_records Summary
Rails Plugin - soft-delete your ActiveRecord records. It's like an explicit version of ActsAsParanoid
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of permanent_records
permanent_records Key Features
permanent_records Examples and Code Snippets
Community Discussions
Trending Discussions on permanent_records
QUESTION
In a Rails 4.2 project I use gem 'permanent_records'
to handle records soft-deletion and gem 'globalize'
for translations.
Globalize sets the following relationships between the translated Model and the Translation Model (source):
...ANSWER
Answered 2017-Dec-05 at 09:46There many ways to handle it. I wouldn't recommend to override dependent: :destroy.
best way to handle it by using paranoia gem which is a re-implementation of acts_as_paranoid. This gem takes care of soft delete with dependent destroy option. Refer: https://github.com/rubysherpas/paranoia
Override callback like this
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install permanent_records
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page