Skip to content

Commit 45f9d16

Browse files
willywgdefunkt
authored andcommitted
1 parent f0f1694 commit 45f9d16

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/resque/tasks.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@
4343
# Preload app files if this is Rails
4444
task :preload do
4545
if defined? Rails
46-
Dir["#{Rails.root}/app/**/*.rb"].each do |file|
47-
require file
46+
if Rails.version >= '3'
47+
require 'rails/all'
48+
else
49+
Dir["#{Rails.root}/app/**/*.rb"].each do |file|
50+
require file
51+
end
4852
end
4953
end
5054
end

0 commit comments

Comments
 (0)