Project

General

Profile

« Previous | Next » 

Revision 9d43fc71

Added by Michael Moll almost 6 years ago

Fixes #19789 - fix Layout/SpaceAroundOperators cop

View differences:

db/migrate/20120624081510_add_auditable_name_and_associated_name_to_audit.rb
attr = {}
auditable_name ||= audit.auditable.try(:to_label) rescue nil
associated_name ||= audit.associated.try(:to_label) rescue nil
attr[:auditable_name] = auditable_name if auditable_name
attr[:associated_name]= associated_name if associated_name
attr[:auditable_name] = auditable_name if auditable_name
attr[:associated_name] = associated_name if associated_name
if audit.username.empty? && audit.user
username = audit.user.to_label rescue nil
attr[:username] = username unless username.empty?

Also available in: Unified diff