From 0402ad4c745dfc7ce46f998aa2f1c112e662ceda Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 7 Jul 2016 07:16:13 +0200 Subject: [PATCH] Applied rubocop. --- app/models/observer/transaction.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/models/observer/transaction.rb b/app/models/observer/transaction.rb index ec871c835..8337aaf4a 100644 --- a/app/models/observer/transaction.rb +++ b/app/models/observer/transaction.rb @@ -207,11 +207,11 @@ class Observer::Transaction < ActiveRecord::Observer return if real_changes.empty? changed_by_id = nil - if record.respond_to?('updated_by_id') - changed_by_id = record.updated_by_id - else - changed_by_id = record.created_by_id - end + changed_by_id = if record.respond_to?('updated_by_id') + record.updated_by_id + else + record.created_by_id + end e = { object: record.class.name,