paranoid_fu 0.4.1 → 0.4.2

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,6 @@
1
+ * (5 Nov 2009) 0.4.2
2
+ Fix conditions for associations when without_deleted is used
3
+
1
4
  * (5 Nov 2009) 0.4.1
2
5
  Add without_deleted option for has_one and has_and_belongs_to_many
3
6
  Fix testing without application
@@ -10,15 +10,16 @@ module ParanoidFu
10
10
  # option of the macro, if given, or +nil+ otherwise.
11
11
  def sanitized_conditions_with_paranoid_fu
12
12
  sanitized_conditions_without_paranoid_fu
13
- if !self.options[:polymorphic] && self.options.delete(:without_deleted)
13
+ if !self.options[:polymorphic] && self.options[:without_deleted]
14
14
  klass = if self.through_reflection
15
15
  self.through_reflection.klass
16
16
  else
17
17
  self.klass
18
18
  end
19
- @sanitized_conditions = klass.merge_conditions(@sanitized_conditions, klass.without_deleted_conditions(klass.table_name)) if klass
19
+ klass.merge_conditions(@sanitized_conditions, klass.without_deleted_conditions(klass.table_name)) if klass
20
+ else
21
+ @sanitized_conditions
20
22
  end
21
- @sanitized_conditions
22
23
  end
23
24
  end
24
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paranoid_fu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio Cambra