Class: ActiveStorage::Attached::One

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

Instance Method Summary collapse

Methods included from RailsCom::AttachedOne

#attached?, #attachment

Instance Method Details

#variant(transformations) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/rails_com/active_storage/activestorage_attached.rb', line 22

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