method

transformations_by_name

Importance_0
v8.0.0 - Show latest stable - 0 notes - Class: Attachment
transformations_by_name(transformations) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activestorage/app/models/active_storage/attachment.rb, line 162
    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
Register or log in to add new notes.