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

16 lines
380 B
Ruby

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