问题
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!
回答1:
You now have deleted scope on your model. Add this to rails_admin config to view your deleted records:
list do
scopes [nil, 'deleted']
来源:https://stackoverflow.com/questions/27290670/manage-soft-deleted-recordsparanoia-in-rails-admin