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
[aaron@TC omglolwut (master)]$ cat lib/tasks/disable_autoload_during_migrations.rake | |
task :disable_autoload do | |
ActiveSupport::Dependencies.class_eval do | |
extend Module.new { | |
def load_file(path, const_paths = loadable_constants_for_path(path)) | |
return if path.starts_with? File.join(Rails.application.root, 'app', 'models') | |
super | |
end | |
} | |
end |