lib/patella.rb in patella-0.9.0 vs lib/patella.rb in patella-0.9.1
- old
+ new
@@ -2,10 +2,11 @@
require "patella/send_later"
require "patella/send_later_worker"
require "active_record"
module Patella
- ::Patella::SendLater.send_now = case ::Rails.env.try(:to_s)
+ rails_env = (defined?(Rails) && Rails.env)
+ ::Patella::SendLater.send_now = case rails_env
when 'development', 'test'
true
else
false
end