Class: Chronicle::ApiLog

Inherits:
ApplicationRecord show all
Defined in:
app/models/chronicle/api_log.rb

Instance Method Summary collapse

Instance Method Details

#get_hashObject



5
6
7
8
9
10
11
12
13
# File 'app/models/chronicle/api_log.rb', line 5

def get_hash
  hash = attributes

  klass = Chronicle.config.user_model

  hash['user'] = klass.find_by(id: user_id)&.basic_info if user_id.present? && klass.present?

  hash
end