RecycleBin

A simple and elegant soft delete solution for Rails applications with a beautiful web interface to manage your deleted records.

1.1.0
Latest Version
Rails 6+
Compatible
MIT
License
Ruby 2.7+
Requirement

Why Choose RecycleBin?

Built specifically for Rails developers who need a reliable, beautiful soft delete solution with zero complexity.

🗑️

Soft Delete Made Simple

Records are marked as deleted instead of being permanently removed. Easy to include in any ActiveRecord model.

🎨

Beautiful Web Interface

Responsive dashboard inspired by Sidekiq's design. View, filter, and manage deleted items with an elegant UI.

High Performance

Efficient pagination and lazy loading. Handles 5000+ deleted records without breaking a sweat.

🔧

Easy Setup

Rails generators automate the entire setup. Add soft delete to any model in under 2 minutes.

📊

Bulk Operations

Select and restore/delete multiple items at once. Filter by model type, time, and more.

🔒

Configurable Access

Built-in authorization support. Restrict access to admins only or use custom authorization logic.

Quick Installation

Get RecycleBin running in your Rails app in just a few steps.

1 Add to Gemfile

Add RecycleBin to your Rails application:

# Gemfile
gem 'recycle_bin', '~> 1.1'
$ bundle install

2 Run Install Generator

Generate configuration and routes:

$ rails generate recycle_bin:install

3 Add deleted_at Column

For each model you want to soft delete:

$ rails generate recycle_bin:add_deleted_at User
$ rails generate recycle_bin:add_deleted_at Post
$ rails db:migrate

4 Include the Module

Add soft delete capability to your models:

class User < ApplicationRecord
  include RecycleBin::SoftDeletable
end

class Post < ApplicationRecord
  include RecycleBin::SoftDeletable
end

5 Start Using!

Your soft delete system is ready:

# Soft delete a record
user = User.find(1)
user.destroy  # Goes to trash

# Visit /recycle_bin to manage deleted items
# Restore from code: user.restore

Documentation & Examples

📚

Full README

Complete documentation with examples, configuration options, and troubleshooting guide.

Read Docs
🔄

Changelog

Track all updates, new features, and improvements across versions.

View Changes
🐛

Issue Tracker

Report bugs, request features, or get help from the community.

Report Issue

Quick Reference

# Basic Usage
user = User.create(name: "John Doe")
user.destroy          # Soft delete
user.deleted?         # => true
user.restore          # Bring back
user.destroy!         # Permanent delete

# Querying
User.all             # Active records only (default scope)
User.deleted         # Deleted records only
User.with_deleted    # All records including deleted
User.restore(123)    # Restore by ID

# Configuration
RecycleBin.configure do |config|
  config.items_per_page = 50
  config.authorize_with do |controller|
    controller.current_user&.admin?
  end
end

Meet the Team

Built with ❤️ by Rails developers for the Rails community.

RS

Rishi Somani

Core Developer

SJ

Shobhit Jain

Core Developer

RA

Raghav Agrawal

Core Developer