method

transformations_by_name

rails latest stable - Class: ActiveStorage::Attachment
transformations_by_name(transformations)
private

No documentation available.

# File activestorage/app/models/active_storage/attachment.rb, line 152
    def transformations_by_name(transformations)
      case transformations
      when Symbol
        variant_name = transformations
        named_variants.fetch(variant_name) do
          record_model_name = record.to_model.model_name.name
          raise ArgumentError, "Cannot find variant :#{variant_name} for #{record_model_name}##{name}"
        end.transformations
      else
        transformations
      end
    end