Created
October 23, 2009 15:37
-
-
Save knowuh/216978 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
in config/initializers/spork.rb | |
# Attempt to keep model access down when running spork. I can't get this | |
# to work in our setup tho. - Noah Oct. 23 | |
# see http://groups.google.com/group/sporkgem/browse_thread/thread/24e6342e6629d371/c37df459c6bf7fca?lnk=gst&q=has_many_polymorphs#c37df459c6bf7fca | |
Spork.trap_class_method(Factory, :find_definitions) | |
class Rails::Initializer | |
def after_initialize_with_trap | |
Spork.trap_class_method(HasManyPolymorphs, :autoload) | |
after_initialize_without_trap | |
end | |
alias_method_chain :after_initialize, :trap | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment