Created
January 23, 2014 22:35
-
-
Save bheeshmar/8588203 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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