Class: Export
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Export
- Defined in:
- app/models/export.rb
Instance Method Summary collapse
Instance Method Details
#build_filename ⇒ Object
23 24 25 |
# File 'app/models/export.rb', line 23 def build_filename File.join(Iqvoc.export_path, "#{token}.#{file_type}") end |
#fail!(exception) ⇒ Object
17 18 19 20 21 |
# File 'app/models/export.rb', line 17 def fail!(exception) self.output = exception.to_s + "\n\n" + exception.backtrace.join("\n") self.finished_at = Time.now save! end |
#finish!(messages) ⇒ Object
10 11 12 13 14 15 |
# File 'app/models/export.rb', line 10 def finish!() self.output = self.success = true self.finished_at = Time.now save! end |