acts_as_paranoid 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/lib/acts_as_paranoid.rb +5 -1
- data/test/fixtures/activerecord_paranoid.sqlite +0 -0
- data/test/paranoid_test.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
data/lib/acts_as_paranoid.rb
CHANGED
@@ -40,7 +40,7 @@ module ActiveRecord #:nodoc:
|
|
40
40
|
|
41
41
|
module ClassMethods
|
42
42
|
def acts_as_paranoid
|
43
|
-
unless self.included_modules.include?(
|
43
|
+
unless self.included_modules.include?(ParanoidMethods) # don't let AR call this twice
|
44
44
|
alias_method :destroy_without_callbacks!, :destroy_without_callbacks
|
45
45
|
class << self
|
46
46
|
alias_method :original_find, :find
|
@@ -105,6 +105,10 @@ module ActiveRecord #:nodoc:
|
|
105
105
|
else "#{scope_constrains[:conditions]} AND #{deleted_cond}"
|
106
106
|
end
|
107
107
|
end
|
108
|
+
|
109
|
+
def validate_find_options(options)
|
110
|
+
options.assert_valid_keys [:conditions, :include, :joins, :limit, :offset, :order, :select, :readonly, :with_deleted]
|
111
|
+
end
|
108
112
|
end
|
109
113
|
|
110
114
|
def destroy_without_callbacks
|
Binary file
|
data/test/paranoid_test.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.10
|
|
3
3
|
specification_version: 1
|
4
4
|
name: acts_as_paranoid
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date: 2005-
|
6
|
+
version: 0.1.7
|
7
|
+
date: 2005-10-22
|
8
8
|
summary: acts_as_paranoid keeps models from actually being deleted by setting a deleted_at field.
|
9
9
|
require_paths:
|
10
10
|
- lib
|