module ActiveStorage::Reflection::ReflectionExtension
def add_attachment_reflection(model, name, reflection)
def add_attachment_reflection(model, name, reflection) model.attachment_reflections = model.attachment_reflections.merge(name.to_s => reflection) end
def reflection_class_for(macro)
def reflection_class_for(macro) case macro when :has_one_attached HasOneAttachedReflection when :has_many_attached HasManyAttachedReflection else super end end