Class: MobilityActiveStorage::ManyBackend

Inherits:
Object
  • Object
show all
Includes:
Mobility::Backend, BackendMethods
Defined in:
lib/mobility_active_storage/many_backend.rb,
sig/mobility_active_storage.rbs

Overview

Mobility backend for a translated collection of Active Storage attachments.

Examples:

class Product < ApplicationRecord
  extend Mobility
  translates :photos, backend: :active_storage_many
end

product.photos.attach(first, second)
Mobility.with_locale(:fr) { product.photos.attach(other) }

Method Summary

Methods included from BackendMethods

#attached, #each_locale, included, #present?, #read, #write