Sha256: fd6ff1133d2f3ff8a285ee78c3edd10ba26b430a061f9e381543e915b81a64e2
Contents?: true
Size: 550 Bytes
Versions: 12
Compression:
Stored size: 550 Bytes
Contents
module IWonder module Logging module ActiveRecordMixins def self.included(base) base.extend(ClassMethods) end def report!(event_sym, options = {}) self.class.report!(event_sym, options) end module ClassMethods def report!(event_sym, options = {}) # TODO: this can skip activerecord and write directly for performance options ||= {} options[:event_type] = event_sym.to_s IWonder::Event.create(options) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems