Class: PersonalInformationLog

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

Instance Method Summary collapse

Methods inherited from ApplicationRecord

descendants_using_encryption, lockbox_options, #timestamp_attributes_for_update_in_model, #valid?

Instance Method Details

#decoded_dataObject

TODO: utility method for working with data persisted by logger middleware consider removing once we have determined how we are going to analyze the data



9
10
11
12
13
14
# File 'app/models/personal_information_log.rb', line 9

def decoded_data
  return data unless data.key?('request_body') && data.key?('response_body')

  data.merge('request_body' => Base64.decode64(data['request_body']),
             'response_body' => Base64.decode64(data['response_body']))
end