Sha256: 2792f4420c3661fbce43b513d542cf4442d5f2d1b43de5b87463199d275dee65
Contents?: true
Size: 587 Bytes
Versions: 51
Compression:
Stored size: 587 Bytes
Contents
module Spotlight ## # Exhibit and browse category mastheads class Masthead < Spotlight::FeaturedImage mount_uploader :image, Spotlight::MastheadUploader def display? display && image.cropped.present? end # Duplicated from Spotlight::FeaturedImage, because mount_uploader # will overwrite it.. # # if the image is local, this step will fail.. # hopefully it's local because it's an uploaded resource, and we'll # catch is in before_validation.. def remote_image_url=(url) super url unless url.starts_with? '/' end end end
Version data entries
51 entries across 51 versions & 1 rubygems