Class: Symphonia::Image

Inherits:
Attachment show all
Defined in:
app/models/symphonia/image.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Attachment

#name

Methods inherited from ApplicationRecord

#to_s

Class Method Details

.image_stylesObject



6
7
8
9
10
# File 'app/models/symphonia/image.rb', line 6

def self.image_styles
  Symphonia.config[:paperclip_styles] || {
    tiny_thumb: '120x120>', thumb: '200x200>', medium: '400x300>', large: '800x600>', original: '1280x800>'
  }
end

Instance Method Details

#url(variant = :original) ⇒ Object



28
29
30
# File 'app/models/symphonia/image.rb', line 28

def url(variant = :original)
  attachment.url(variant)
end