Module: BetterStorage::Patches::Attachment

Defined in:
lib/better_storage/patches/attachment.rb

Instance Method Summary collapse

Instance Method Details

#public_url(style = :original) ⇒ Object



4
5
6
7
8
# File 'lib/better_storage/patches/attachment.rb', line 4

def public_url(style = :original)
  return nil unless persisted?
  key = style == :original ? self.key : variant_key_for(style)
  BetterStorage.public_url(key)
end