module MiniPaperclip

Constants

VERSION

Public Class Methods

config() click to toggle source
# File lib/mini_paperclip.rb, line 23
def config
  @config ||= Config.new(
    # defaults
    interpolates: {
      ':class' => ->(_) { class_result },
      ':attachment' => ->(_) { attachment_result },
      ':hash' => ->(style) { hash_key(style) },
      ':extension' => ->(_) { extension },
      ':id' => ->(_) { @attachment.record.id },
      ':updated_at' => ->(_) { attachment.updated_at&.to_i },
      ':style' => ->(style) { style }
    },
    hash_data: ":class/:attachment/:id/:style/:updated_at",
    url_missing_path: ":attachment/:style/missing.png",
    keep_old_files: false,
    read_timeout: 60,
    logger: Logger.new($stdout),
  )
end