Sha256: 1b0b6c46c86c697e32e10252cf4ae5b56a5005f10ac9099976640d0bf21b040e
Contents?: true
Size: 589 Bytes
Versions: 19
Compression:
Stored size: 589 Bytes
Contents
module Kuhsaft class ImageBrick < Brick attr_accessible :image, :caption, :href, :image_size mount_uploader :image, Kuhsaft::ImageBrickImageUploader validates :image, :presence => true validates :image_size, :presence => true after_save :resize_image_if_size_changed def resize_image_if_size_changed image.recreate_versions! if image_size_changed? && image_present? end def collect_fulltext [super, caption].join(' ') end def user_can_add_childs? false end def image_present? image.present? end end end
Version data entries
19 entries across 19 versions & 1 rubygems