Sha256: 089f290b5e2eae184b88e338a0b260e5dabfbef65653c916c92ddf53df9dec3d
Contents?: true
Size: 519 Bytes
Versions: 14
Compression:
Stored size: 519 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 before_save :resize_image_if_size_changed def resize_image_if_size_changed image.recreate_versions! if image_size_changed? end def collect_fulltext [super, caption].join(' ') end def user_can_add_childs? false end end end
Version data entries
14 entries across 14 versions & 1 rubygems