lightsaber
lightsaber

Reputation: 1481

Manage soft deleted records(paranoia) in rails_admin

In my rails 4 app I'm using paranoia to soft delete users and rails_admin for admin interface.

Currently in rails_admin after deleting a record it doesn't show deleted records. I want to see all records in rails_admin where deleted records are marked differently and create a custom action to restore deleted records.

Thanks!

Upvotes: 2

Views: 933

Answers (1)

Dmitry Polyakovsky
Dmitry Polyakovsky

Reputation: 1585

You now have deleted scope on your model. Add this to rails_admin config to view your deleted records:

list do
  scopes    [nil, 'deleted']

Upvotes: 3

Related Questions