Skip to content

Instantly share code, notes, and snippets.

@bheeshmar
Created January 23, 2014 22:35
Show Gist options
  • Save bheeshmar/8588203 to your computer and use it in GitHub Desktop.
Save bheeshmar/8588203 to your computer and use it in GitHub Desktop.
module Foo
def included(base)
base.extend ClassMethods
# We need to call these AR methods ON the class
base.class_eval do
after_commit :foo
end
end
module ClassMethods
def find_by_foo(foo)
end
end
# Instance Methods here, including the body of the after_commit
def foo
puts 'boo'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment