Archive: ComponentOwl Rails app, DB backups, go redirect script

This commit is contained in:
EC2 Default User
2026-03-23 16:20:05 +00:00
commit 50037f386f
218 changed files with 14558 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
Paperclip.interpolates(:product_code) do |attachment, style|
attachment.instance.product.code
end
Paperclip.interpolates(:size) do |attachment, style|
attachment.instance.size
end
Paperclip.interpolates(:timestamp) do |attachment, style|
attachment.instance_read(:updated_at).in_time_zone(7).strftime("%s")
end
Paperclip.interpolates(:s3_url) do |attachment, style|
path = attachment.path(style)
"#{attachment.s3_protocol}://#{Settings.uploadable_asset_host % (path.hash % 4)}/#{path.gsub(%r{^/}, "")}"
end