Skip to content

Instantly share code, notes, and snippets.

@hannesfostie
Created May 27, 2015 15:04
Show Gist options
  • Save hannesfostie/8a2021daefab38dbe2a1 to your computer and use it in GitHub Desktop.
Save hannesfostie/8a2021daefab38dbe2a1 to your computer and use it in GitHub Desktop.
module ChangeLogger
extend ActiveSupport::Concern
included do
extend ClassMethods
log_changes
end
module ClassMethods
def log_changes
# define after[create|update|destroy] callbacks here
# result is a fairly expensive method to log changes to Logstash
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment