Class: Form1010cg::Attachment
- Inherits:
-
FormAttachment
- Object
- ActiveRecord::Base
- ApplicationRecord
- FormAttachment
- Form1010cg::Attachment
- Defined in:
- app/models/form1010cg/attachment.rb
Constant Summary collapse
- ATTACHMENT_UPLOADER_CLASS =
::Form1010cg::PoaUploader
Instance Method Summary collapse
Methods inherited from FormAttachment
#get_attachment_uploader, #get_file, #parsed_file_data, #set_file_data!, #unlock_pdf
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger, #set_sentry_metadata
Methods inherited from ApplicationRecord
descendants_using_encryption, lockbox_options, #timestamp_attributes_for_update_in_model, #valid?
Instance Method Details
#to_local_file ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/models/form1010cg/attachment.rb', line 7 def to_local_file remote_file = get_file local_path = "tmp/#{remote_file.path.gsub('/', '_')}" File.write(local_path, remote_file.read) local_path end |