Sha256: 3c3f98eb19b23c0337ded998b455929aa35b104dac36bc939e43f11d745b6ac5
Contents?: true
Size: 497 Bytes
Versions: 9
Compression:
Stored size: 497 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 def image_present? image.present? end end end end
Version data entries
9 entries across 9 versions & 1 rubygems