acts_as_paranoid 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ *0.1.7* (22 Oct 2005)
2
+
3
+ * Added :with_deleted as a valid option of ActiveRecord::Base#find
4
+
1
5
  *0.1.6* (25 Sep 2005)
2
6
 
3
7
  * Fixed bug where nested constrains would get clobbered after multiple queries
@@ -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?(ActiveRecord::Acts::Paranoid::ParanoidMethods) # don't let AR call this twice
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
@@ -1,9 +1,9 @@
1
1
  require 'abstract_unit'
2
2
 
3
3
  class Widget < ActiveRecord::Base
4
+ acts_as_paranoid
4
5
  has_many :categories, :dependent => true
5
6
  has_and_belongs_to_many :habtm_categories, :class_name => 'Category'
6
- acts_as_paranoid
7
7
  end
8
8
 
9
9
  class Category < ActiveRecord::Base
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.6
7
- date: 2005-09-25
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