Module: IWonder::Logging::ActiveRecordMixins::ClassMethods

Defined in:
lib/i_wonder/logging/active_record_mixins.rb

Instance Method Summary collapse

Instance Method Details

#report!(event_sym, options = {}) ⇒ Object



14
15
16
17
18
19
# File 'lib/i_wonder/logging/active_record_mixins.rb', line 14

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