Gem Version

Library for removing and clearing data in Rails ActiveRecord models

Release blog post, ActiveRecord models: How to remove data in GDPR compliant way


  1. Add WipeOut to your application's Gemfile:
gem "wipe_out", "~> 1.0"

Check newest release at here.


Quick example:

Given the following model:

# == Schema Info
# Table name: users
#  id                  :integer(11)    not null, primary key
#  name                :varchar(11)    not null
#  orders_count        :integer(11)    not null
class User < ActiveRecord::Base

We can define custom wipe out plan:

UserWipeOutPlan = WipeOut.build_plan do
  wipe_out :name
  ignore :orders_count

and execute it:

User.last.then { |user| UserWipeOutPlan.execute(user) }

It will overwrite data inside name but leave, orders_count untouched.

There is also support for relations and making sure that policies are defined for any added columns.

Read more in getting started doc.

Contributing && Development

See development.md