Sha256: 96d5f96f8c0391c5b0814bd58840861997ef7a0e7197b8e941408410de58cb15
Contents?: true
Size: 490 Bytes
Versions: 14
Compression:
Stored size: 490 Bytes
Contents
require 'carrierwave' require 'active_support/concern' module Kuhsaft module ImageUploaderMounting extend ActiveSupport::Concern included do extend CarrierWave::Mount mount_uploader :image, Kuhsaft::ImageBrickImageUploader after_save :resize_image_if_size_changed def resize_image_if_size_changed image.recreate_versions! if image_size_changed? && image_present? end delegate :present?, to: :image, prefix: true end end end
Version data entries
14 entries across 14 versions & 2 rubygems