Class: CspReport

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

Overview

== Schema Information

Table name: csp_reports
Database name: primary

id :bigint not null, primary key
blocked_uri :string
disposition :string
document_uri :string
effective_directive :string
raw_browser :string
raw_report :jsonb not null
referrer :string
status_code :integer default(0), not null
violated_directive :string
created_at :datetime not null
updated_at :datetime not null

Indexes

index_csp_reports_on_blocked_uri (blocked_uri)
index_csp_reports_on_created_at (created_at)
index_csp_reports_on_effective_directive (effective_directive)
index_csp_reports_on_status_code (status_code)
index_csp_reports_on_violated_directive (violated_directive)

Constant Summary

Constants included from Schedulable

Schedulable::SIMPLE_FORM_OPTIONS

Instance Method Summary collapse

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Schedulable

config

Methods included from Models::AfterCommittable

#after_commit

Methods included from Models::EventPublishable

#publish_event

Instance Method Details

#to_partial_pathObject

Partial lives under app/views/admin/csp_reports/, not the
conventional app/views/csp_reports/. Override so render @csp_reports
resolves correctly from any controller, not just
Admin::CspReportsController.



33
34
35
# File 'app/models/csp_report.rb', line 33

def to_partial_path
  'admin/csp_reports/csp_report'
end