auditing 1.1.0 → 1.1.1
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/VERSION +1 -1
- data/auditing.gemspec +1 -1
- data/lib/auditing/audit_relationship.rb +1 -1
- data/lib/auditing/auditor.rb +2 -4
- data/spec/auditing/auditor_spec.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.1
|
data/auditing.gemspec
CHANGED
@@ -90,7 +90,7 @@ module Auditing
|
|
90
90
|
return unless send(model).respond_to?('log_association_create')
|
91
91
|
field_names.each do |field|
|
92
92
|
field_value = send(field)
|
93
|
-
next unless field_value
|
93
|
+
next unless field_value.present?
|
94
94
|
model_instance = send(model)
|
95
95
|
model_instance.log_association_create(self, {:field => field,
|
96
96
|
:value => field_value})
|
data/lib/auditing/auditor.rb
CHANGED
@@ -5,15 +5,13 @@ module Auditing
|
|
5
5
|
undoable?
|
6
6
|
end
|
7
7
|
|
8
|
-
def show_action
|
9
|
-
action
|
10
|
-
end
|
11
|
-
|
12
8
|
def old_value
|
9
|
+
return nil unless read_attribute(:old_value)
|
13
10
|
Marshal.load(read_attribute(:old_value))
|
14
11
|
end
|
15
12
|
|
16
13
|
def new_value
|
14
|
+
return nil unless read_attribute(:new_value)
|
17
15
|
Marshal.load(read_attribute(:new_value))
|
18
16
|
end
|
19
17
|
|