Module: Lockbox::ActiveStorageExtensions::Attachment
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/lockbox/active_storage_extensions.rb
Instance Method Summary collapse
Instance Method Details
#download ⇒ Object
105 106 107 108 109 110 111 112 113 114 |
# File 'lib/lockbox/active_storage_extensions.rb', line 105 def download result = super = Utils.(record, name) if result = Utils.build_box(record, , record.class.table_name, name).decrypt(result) end result end |
#mark_analyzed ⇒ Object
116 117 118 119 120 |
# File 'lib/lockbox/active_storage_extensions.rb', line 116 def mark_analyzed if Utils.(record, name) blob.update!(metadata: blob..merge(analyzed: true)) end end |