Class: ActiveStorage::Attached::One

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_com/active_storage/activestorage_attached.rb

Instance Method Summary collapse

Instance Method Details

#variant(transformations) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/rails_com/active_storage/activestorage_attached.rb', line 25

def variant(transformations)
  if attachment&.variable?
    attachment.variant(transformations)
  else
    self
  end
end