Skip to content

jazminschroeder/loggable_event

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LoggableEvent

Quickly add logs to any model

How to use it

#Add to your Gemfile
gem 'loggable_event'

#Install the generator
rails generate loggable_event:install

#Run migrations
rake db:migrate

#Add logs to your classes
require "loggable_event"
class Order < ActiveRecord::Base
  include LoggableEvent
  
end 

order = Order.first
order.log('Order Received')
order.log('Order Shipped')
order.log('Email sent to customer', 'Email content')

#Get a list of all logs
order.logs

About

Add logs to any model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages