Class: Pulitzer::ImageUploader

Inherits:
BaseUploader
  • Object
show all
Includes:
CarrierWave::MiniMagick
Defined in:
app/uploaders/pulitzer/image_uploader.rb

Instance Method Summary collapse

Methods inherited from BaseUploader

#store_dir

Instance Method Details

#default_urlObject



15
16
17
# File 'app/uploaders/pulitzer/image_uploader.rb', line 15

def default_url
  Pulitzer.missing_image_path
end

#dynamic_resizeObject



19
20
21
# File 'app/uploaders/pulitzer/image_uploader.rb', line 19

def dynamic_resize
  resize_to_fit model.width, model.height
end

#version_available?(photo) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
26
# File 'app/uploaders/pulitzer/image_uploader.rb', line 23

def version_available? photo
  true
  # !model.version_unavailable
end