Sha256: 0592ab9f18b823733e93c5a637b2b4ed1135685b4e83e8ae2effb4d72f75b005
Contents?: true
Size: 587 Bytes
Versions: 8
Compression:
Stored size: 587 Bytes
Contents
require 'file_size_validator' module Fae class Image < ActiveRecord::Base include Fae::BaseModelConcern include Fae::ImageConcern include Fae::AssetsValidatable attr_accessor :redirect mount_uploader :asset, Fae::ImageUploader after_save :recreate_versions validates :asset, file_size: { maximum: Fae.max_image_upload_size.megabytes.to_i } belongs_to :imageable, polymorphic: true, touch: true private def recreate_versions asset.recreate_versions! if Fae.recreate_versions && asset.present? end end end
Version data entries
8 entries across 8 versions & 1 rubygems