lib/salesforce/bulk/batch.rb in activeforce-1.9.1 vs lib/salesforce/bulk/batch.rb in activeforce-1.10.0

- old
+ new

@@ -55,10 +55,10 @@ self.state == status.to_s.titleize end end def temporary_csv_file - if Object.const_defined?(:Rails) + if Object.const_defined?(:Rails) && Rails.root.present? Rails.root.join('tmp', 'files', "#{ Time.now.to_i}#{rand(10000)}.csv") else File.join("/tmp/#{ Time.now.to_i}#{rand(10000)}.csv") end end