2018-03-12 22:46:41 -07:00

16 lines
370 B
Ruby

require 'active_support/notifications'
module FastJsonapi
module ObjectSerializer
alias_method :serialized_json_without_instrumentation, :serialized_json
def serialized_json
ActiveSupport::Notifications.instrument(SERIALIZED_JSON_NOTIFICATION, { name: self.class.name }) do
serialized_json_without_instrumentation
end
end
end
end