paranoid_fu 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/lib/paranoid_fu/reflection_conditions.rb +4 -3
- metadata +1 -1
data/CHANGELOG
CHANGED
@@ -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
|
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
|
-
|
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
|