Module: PolicyManager::Concerns::PaperclipBehavior

Extended by:
ActiveSupport::Concern
Includes:
Paperclip::Glue
Included in:
PortabilityRequest
Defined in:
app/models/policy_manager/concerns/paperclip_behavior.rb

Instance Method Summary collapse

Instance Method Details



24
25
26
27
# File 'app/models/policy_manager/concerns/paperclip_behavior.rb', line 24

def download_link
  url = self.attachment.expiring_url(PolicyManager::Config.exporter.expiration_link)
  PolicyManager::Config.exporter.customize_link(url)
end

#file_remote_url=(url_value) ⇒ Object



18
19
20
21
22
# File 'app/models/policy_manager/concerns/paperclip_behavior.rb', line 18

def file_remote_url=(url_value)
  self.attachment = File.open(url_value) unless url_value.blank?
  self.save
  self.complete!
end