Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/super_diff/active_record/monkey_patches.rb

Overview

rubocop:disable Style/BracesAroundHashParameters, Style/ClassAndModuleChildren

Instance Method Summary collapse

Instance Method Details

#attributes_for_super_diffObject



3
4
5
6
7
# File 'lib/super_diff/active_record/monkey_patches.rb', line 3

def attributes_for_super_diff
  (attributes.keys.sort - ["id"]).reduce({ id: id }) do |hash, key|
    hash.merge(key.to_sym => attributes[key])
  end
end