Skip to content

Commit

Permalink
[ci skip] whitespace cleanup that should've happened as part of 899c15b
Browse files Browse the repository at this point in the history
  • Loading branch information
batter committed Mar 2, 2015
1 parent 10908ed commit 59bca66
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/paper_trail/has_paper_trail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ def source_version
def record_create
if paper_trail_switched_on?
data = {
:event => paper_trail_event || 'create',
:whodunnit => PaperTrail.whodunnit
:event => paper_trail_event || 'create',
:whodunnit => PaperTrail.whodunnit
}
if respond_to?(:created_at)
data[PaperTrail.timestamp_field] = created_at
Expand All @@ -303,9 +303,9 @@ def record_update
if paper_trail_switched_on? && changed_notably?
object_attrs = object_attrs_for_paper_trail(attributes_before_change)
data = {
:event => paper_trail_event || 'update',
:object => self.class.paper_trail_version_class.object_col_is_json? ? object_attrs : PaperTrail.serializer.dump(object_attrs),
:whodunnit => PaperTrail.whodunnit
:event => paper_trail_event || 'update',
:object => self.class.paper_trail_version_class.object_col_is_json? ? object_attrs : PaperTrail.serializer.dump(object_attrs),
:whodunnit => PaperTrail.whodunnit
}
if respond_to?(:updated_at)
data[PaperTrail.timestamp_field] = updated_at
Expand Down Expand Up @@ -352,11 +352,11 @@ def record_destroy
if paper_trail_switched_on? and not new_record?
object_attrs = object_attrs_for_paper_trail(attributes_before_change)
data = {
:item_id => self.id,
:item_type => self.class.base_class.name,
:event => paper_trail_event || 'destroy',
:object => self.class.paper_trail_version_class.object_col_is_json? ? object_attrs : PaperTrail.serializer.dump(object_attrs),
:whodunnit => PaperTrail.whodunnit
:item_id => self.id,
:item_type => self.class.base_class.name,
:event => paper_trail_event || 'destroy',
:object => self.class.paper_trail_version_class.object_col_is_json? ? object_attrs : PaperTrail.serializer.dump(object_attrs),
:whodunnit => PaperTrail.whodunnit
}
if self.class.paper_trail_version_class.column_names.include?('transaction_id')
data[:transaction_id] = PaperTrail.transaction_id
Expand Down

0 comments on commit 59bca66

Please sign in to comment.