lib/resque/tasks.rb in resque-1.18.2 vs lib/resque/tasks.rb in resque-1.18.3
- old
+ new
@@ -41,11 +41,15 @@
end
# Preload app files if this is Rails
task :preload do
if defined? Rails
- Dir["#{Rails.root}/app/**/*.rb"].each do |file|
- require file
+ if Rails.version >= '3'
+ require 'rails/all'
+ else
+ Dir["#{Rails.root}/app/**/*.rb"].each do |file|
+ require file
+ end
end
end
end
end