Class: Spotlight::Masthead
- Inherits:
-
FeaturedImage
- Object
- ActiveRecord::Base
- FeaturedImage
- Spotlight::Masthead
- Defined in:
- app/models/spotlight/masthead.rb
Overview
Exhibit and browse category mastheads
Instance Method Summary collapse
- #display? ⇒ Boolean
-
#remote_image_url=(url) ⇒ Object
Duplicated from Spotlight::FeaturedImage, because mount_uploader will overwrite it..
Methods inherited from FeaturedImage
Instance Method Details
#display? ⇒ Boolean
7 8 9 |
# File 'app/models/spotlight/masthead.rb', line 7 def display? display && image.cropped.present? end |
#remote_image_url=(url) ⇒ Object
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..
17 18 19 |
# File 'app/models/spotlight/masthead.rb', line 17 def remote_image_url=(url) super url unless url.starts_with? '/' end |