Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't require Rails and ActionMailer since delayed_job can be used in…

… plain ol' ruby apps with Active Record
  • Loading branch information...
commit fa5aab7b614169b491a166399a0993537c936752 1 parent 7232cf1
@bkeepers bkeepers authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/delayed_job.rb
View
4 lib/delayed_job.rb
@@ -2,11 +2,11 @@
require File.dirname(__FILE__) + '/delayed/message_sending'
require File.dirname(__FILE__) + '/delayed/performable_method'
-require File.dirname(__FILE__) + '/delayed/performable_mailer'
+require File.dirname(__FILE__) + '/delayed/performable_mailer' if defined?(ActionMailer)
require File.dirname(__FILE__) + '/delayed/yaml_ext'
require File.dirname(__FILE__) + '/delayed/backend/base'
require File.dirname(__FILE__) + '/delayed/worker'
-require File.dirname(__FILE__) + '/delayed/railtie'
+require File.dirname(__FILE__) + '/delayed/railtie' if defined?(Rails::Railtie)
Object.send(:include, Delayed::MessageSending)
Module.send(:include, Delayed::MessageSending::ClassMethods)
Please sign in to comment.
Something went wrong with that request. Please try again.