Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 48 lines (33 sloc) 1.125 kB
8d0514c @scashin133 Making it possible to test multiple activerecord versions at once.
scashin133 authored
1 [![Build Status](https://secure.travis-ci.org/socialcast/delete_paranoid.png?branch=master)](http://travis-ci.org/socialcast/delete_paranoid)
2
7296304 update license
Ryan Sonnek authored
3 # delete_paranoid
4
5 Soft Delete ActiveRecord instances.
6
7 ## Usage
8
9 ```ruby
10 class Blog < ActiveRecord::Base
11 acts_as_paranoid
12 end
13 blog = Blog.create! :name => 'foo'
14
15 # soft delete the instance
16 blog.destroy
17
18 # query database for results *including* soft deleted objects
19 Blog.with_deleted do
20 Blog.all
21 end
22
23 # permenantly delete the instance from the database
24 Blog.delete! blog.id
25 ```
26
27 ## Features
28 * simple configuration
29 * preserves existing ActiveRecord API. No magical new API's to use when you want to soft delete a record
30 * automatically exclude soft deleted records from database queries (by default)
31 * support for querying database for all records (including soft deleted ones)
32 * support for permenantly deleting record from database
33
34 ## Contributing
35
36 * Fork the project
37 * Fix the issue
38 * Add tests
39 * Submit a pull request on github
40
41 see CONTRIBUTORS.txt for complete list of contributors
42
43 ## Copyright
44
45 Copyright (c) 2011 Socialcast Inc.
46 See LICENSE.txt for further details.
47
Something went wrong with that request. Please try again.