blob: e72c125fb694b08780c01fca3d180d241762d626 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
class WebHookLog < ActiveRecord::Base
belongs_to :web_hook
serialize :request_headers, Hash # rubocop:disable Cop/ActiveRecordSerialize
serialize :request_data, Hash # rubocop:disable Cop/ActiveRecordSerialize
serialize :response_headers, Hash # rubocop:disable Cop/ActiveRecordSerialize
validates :web_hook, presence: true
def success?
response_status =~ /^2/
end
end
|